:root {
  /* 29CM Dark Editorial Palette */
  --inshot-bg: #111215;
  --inshot-surface: #16181e;
  --inshot-card: #1c1f28;
  --inshot-card-hover: #232733;
  --inshot-coral: #ff5a43;
  /* 29CM 테라코타 코랄 */
  --inshot-coral-hover: #ff4125;
  --inshot-coral-subtle: rgba(255, 90, 67, 0.16);
  --inshot-yellow: #ffd600;
  /* 윔블던 골드 */
  --inshot-green: #22c55e;
  --inshot-tennis: #ccff00;
  /* 테니스 형광 라임 볼 */
  --inshot-text: #f8fafc;
  --inshot-subtext: #94a3b8;
  --inshot-muted: #64748b;
  --inshot-border: rgba(255, 255, 255, 0.08);
  --inshot-border-hover: rgba(255, 255, 255, 0.18);

  /* 사용자 지정 레이아웃 폭/높이 CSS 변수 */
  --point-bar-height: 104px;
  --tools-bar-height: 54px;
  --timeline-height: 98px;
}

/* ========================================================
       29CM EDITORIAL BRAND STYLING
       - Deep matte charcoal (#111215)
       - High-contrast pure white pill buttons (#ffffff + #111)
       - 29CM typography, tracking, micro-badges & capsule pills
       - Signature coral (#ff5a43) & electric tennis green (#ccff00)
       ======================================================== */
body {
  background: #111215 !important;
  color: #f8fafc !important;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", sans-serif !important;
  letter-spacing: -0.2px;
}

/* 1. Header & Brand Capsule */
header.inshot-top-bar {
  height: 52px !important;
  background: rgba(17, 18, 21, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 0 14px !important;
}

.tenniscut-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #171922;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.tenniscut-header-brand:hover {
  background: #20232e;
  border-color: rgba(255, 255, 255, 0.25);
}

.tenniscut-brand-icon {
  font-size: 13px;
}

.top-app-title {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.3px !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

/* Mode Toggle Group (General vs Tennis) */
.mode-toggle-group {
  background: #181a24 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 9999px !important;
  padding: 3px !important;
  gap: 2px !important;
}

.btn-mode-pill {
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 10px !important;
  color: #94a3b8 !important;
  background: transparent !important;
  border: none !important;
  transition: all 0.15s !important;
}

.btn-mode-pill.active {
  background: #ffffff !important;
  color: #111215 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Open Video Button */
.btn-top-open {
  background: #181a24 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  border-radius: 9999px !important;
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s !important;
}

.btn-top-open:hover {
  background: #232733 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

/* Top Right Action Buttons */
.btn-top-shortcuts,
.btn-top-autocut,
.btn-top-settings,
.btn-top-preview {
  height: 32px !important;
  border-radius: 9999px !important;
  padding: 0 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  background: #181a24 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
}

.btn-top-shortcuts:hover,
.btn-top-autocut:hover,
.btn-top-settings:hover,
.btn-top-preview:hover {
  background: #222633 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-top-autocut {
  color: #ccff00 !important;
  border-color: rgba(204, 255, 0, 0.25) !important;
  background: rgba(204, 255, 0, 0.06) !important;
}

.btn-top-autocut:hover {
  background: rgba(204, 255, 0, 0.15) !important;
  border-color: rgba(204, 255, 0, 0.5) !important;
}

/* 29CM Signature High-Contrast White Pill Export Button */
.btn-save-pill,
#btn-top-export {
  background: #ffffff !important;
  color: #111215 !important;
  border: none !important;
  border-radius: 9999px !important;
  height: 34px !important;
  padding: 0 16px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 12px rgba(255, 255, 255, 0.22) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: -0.2px !important;
  transition: all 0.15s ease !important;
}

.btn-save-pill:hover,
#btn-top-export:hover {
  background: #f1f5f9 !important;
  transform: scale(1.03) !important;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.35) !important;
}

.btn-save-pill:active,
#btn-top-export:active {
  transform: scale(0.96) !important;
}



/* 3. Action Bar (Undo, Redo, Play, Timecode, Screen Ratio) */
section.inshot-action-bar {
  background: #14161c !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 0 14px !important;
  height: 48px !important;
}

.btn-action-icon {
  background: #1a1c25 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  color: #cbd5e1 !important;
  transition: all 0.15s ease !important;
}

.btn-action-icon:hover {
  background: #232734 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

#btn-play-toggle {
  background: #ffffff !important;
  color: #111215 !important;
  border-radius: 9999px !important;
  width: 44px !important;
  height: 34px !important;
  font-weight: 900 !important;
  border: none !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.1s ease !important;
}

#btn-play-toggle:active {
  transform: scale(0.92) !important;
}

#btn-action-rally-swap {
  background: rgba(255, 90, 67, 0.14) !important;
  border: 1px solid rgba(255, 90, 67, 0.35) !important;
  color: #ff6b57 !important;
  border-radius: 9999px !important;
  height: 32px !important;
  padding: 0 12px !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

#btn-action-rally-swap:hover {
  background: rgba(255, 90, 67, 0.22) !important;
}

.time-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 12px !important;
  color: #71717a !important;
}

.time-code .current-t {
  color: #ff6b57 !important;
  font-weight: 700 !important;
}

/* 4. Live Metrics Bar (Editorial Broadcast Strip) */
.tennis-live-metrics-bar {
  background: #161821 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  margin: 4px 12px !important;
  padding: 6px 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

/* 5. Tennis Score Point Bar & Team Cards */
.tennis-score-point-bar {
  background: #14161d !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.score-point-center {
  background: #181a24 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
}

.btn-point-undo,
.btn-point-batch,
.btn-swipe-mode-toggle {
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  background: #20232f !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  transition: all 0.15s !important;
}

.btn-point-undo:hover,
.btn-point-batch:hover,
.btn-swipe-mode-toggle:hover {
  background: #2a2e3e !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

.swipe-quad {
  background: #191c26 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  transition: all 0.15s ease !important;
}

.swipe-quad:hover {
  background: #222633 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.swipe-quad-name {
  color: #f8fafc !important;
  font-weight: 700 !important;
}

/* 6. Bottom Tools Bar (Toolbar) */
.bottom-tools-wrapper {
  background: #12141a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

nav.inshot-bottom-tools {
  background: transparent !important;
  padding: 4px 6px !important;
  gap: 3px !important;
}

.tool-item {
  background: #181a23 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px !important;
  transition: all 0.15s ease !important;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  touch-action: pan-x;
}

.tool-item:hover {
  background: #232733 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px);
}

.tool-item:active {
  transform: scale(0.95);
  cursor: pointer;
}

.tool-item.tool-holding-press {
  border-color: rgba(0, 229, 255, 0.75) !important;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.5) !important;
  transform: scale(0.96) !important;
  transition: all 0.2s ease !important;
}

.tool-item.is-dragging-tool {
  opacity: 0.95 !important;
  border-color: #00e5ff !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 229, 255, 0.95), 0 0 4px #fff !important;
  transform: scale(1.15) translateY(-5px) !important;
  z-index: 100 !important;
  cursor: grabbing !important;
  pointer-events: none !important;
  animation: none !important;
}

/* 스마트폰 앱 흔들림(Wiggle / Jiggle) 애니메이션 효과 */
@keyframes tool-app-wiggle-even {
  0% {
    transform: rotate(-1.2deg) translateY(0);
  }

  50% {
    transform: rotate(1.2deg) translateY(-1px);
  }

  100% {
    transform: rotate(-1.2deg) translateY(0);
  }
}

@keyframes tool-app-wiggle-odd {
  0% {
    transform: rotate(1.2deg) translateY(-1px);
  }

  50% {
    transform: rotate(-1.2deg) translateY(0);
  }

  100% {
    transform: rotate(1.2deg) translateY(-1px);
  }
}

nav.inshot-bottom-tools.reordering-mode .tool-item:not(.is-dragging-tool):nth-child(even) {
  animation: tool-app-wiggle-even 0.26s infinite ease-in-out !important;
}

nav.inshot-bottom-tools.reordering-mode .tool-item:not(.is-dragging-tool):nth-child(odd) {
  animation: tool-app-wiggle-odd 0.28s infinite ease-in-out !important;
}

/* 플레이 & 일시정지 도구 아이콘 전용 스타일 */
#tool-play-pause {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#tool-play-pause * {
  pointer-events: none;
}

#tool-play-pause .tool-icon {
  color: #4ade80 !important;
  font-size: 15px !important;
  transition: color 0.15s ease;
}

#tool-play-pause.is-playing .tool-icon {
  color: #38bdf8 !important;
}

.tool-item.tool-drag-over-left {
  position: relative !important;
  border-left: 3px solid #00e5ff !important;
  box-shadow: -4px 0 14px rgba(0, 229, 255, 0.75) !important;
}

.tool-item.tool-drag-over-right {
  position: relative !important;
  border-right: 3px solid #00e5ff !important;
  box-shadow: 4px 0 14px rgba(0, 229, 255, 0.75) !important;
}

.tool-name {
  color: #94a3b8 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  font-size: 9px !important;
  border-radius: 4px !important;
  padding: 1px 4px !important;
}

/* Rally Start Highlight Button */
#tool-rally-start {
  background: linear-gradient(135deg, rgba(204, 255, 0, 0.16), rgba(163, 230, 53, 0.08)) !important;
  border: 1.5px solid #ccff00 !important;
  color: #ccff00 !important;
  box-shadow: 0 2px 10px rgba(204, 255, 0, 0.22) !important;
}

#tool-rally-start .tool-name {
  color: #ccff00 !important;
  font-weight: 700 !important;
}

/* 7. Timeline Tracks & Needle */
section.timeline-container {
  background: #111215 !important;
}

.timeline-ruler {
  background: #14161c !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #71717a !important;
}

.timeline-needle {
  background: #ffffff !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;
}

.needle-handle {
  background: #ffffff !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* 8. Drawers & Modals (29CM Editorial) */
.sub-drawer {
  background: rgba(20, 22, 29, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.drawer-title {
  color: #f8fafc !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  letter-spacing: -0.2px !important;
}

.font-card {
  border-radius: 9999px !important;
  background: #1a1d26 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}

.font-card:hover {
  background: #242836 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

.font-card.active {
  background: #ffffff !important;
  color: #111215 !important;
  border-color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}



* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--inshot-bg);
  color: var(--inshot-text);
  height: 100vh;
  height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ========================================================
       1. InShot Top Bar (뒤로가기, 해상도 선택, 열기, 저장 버튼)
       ======================================================== */
header.inshot-top-bar {
  height: 48px;
  background: var(--inshot-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--inshot-border);
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
  gap: 8px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

.top-app-title {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.btn-icon-back {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon-back:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.12);
}

.btn-top-open {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-top-autocut {
  background: linear-gradient(135deg, rgba(204, 255, 0, 0.2), rgba(0, 230, 118, 0.2));
  border: 1px solid rgba(0, 230, 118, 0.5);
  color: #ccff00;
  font-size: 11px;
  font-weight: 800;
  height: 32px;
  padding: 0 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-top-autocut:active {
  transform: scale(0.94);
  background: rgba(0, 230, 118, 0.35);
}

.btn-top-settings {
  background: var(--inshot-surface);
  border: 1px solid var(--inshot-border);
  color: #ddd;
  font-size: 11px;
  font-weight: 800;
  height: 32px;
  padding: 0 9px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-top-settings:active {
  transform: scale(0.94);
  background: var(--inshot-card);
  color: #fff;
}

.btn-save-pill {
  background: linear-gradient(135deg, #ff3b5c, #ff5252);
  color: #fff;
  border: none;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 900;
  height: 34px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 3px 12px rgba(255, 59, 92, 0.45);
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0 !important;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

.btn-save-pill:active {
  transform: scale(0.94);
  filter: brightness(1.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-save-pill:hover {
    background: var(--inshot-coral-hover);
    transform: scale(1.02);
  }
}

/* ========================================================
       2. InShot Video Preview Viewport & Pan/Zoom Canvas
       ======================================================== */
.viewport-box {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  background: #090c13;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.viewport-box:active {
  cursor: grabbing;
}

.canvas-wrapper {
  position: relative;
  background: #000;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95), 0 0 0 1.5px rgba(255, 255, 255, 0.25);
  transition: aspect-ratio 0.2s, outline 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  touch-action: none;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  /* [CRITICAL] InShot 1:1 WYSIWYG Frame Clipping: Prevents text/scoreboard leaking into letterbox */
  outline: 1.5px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
}

.canvas-wrapper.dragging-overlay {
  outline: 1.5px solid rgba(251, 197, 49, 0.85);
  outline-offset: -1px;
}

.canvas-wrapper.dragging-overflow {
  outline: 2px solid rgba(255, 71, 87, 0.95) !important;
  outline-offset: -2px;
  box-shadow: 0 0 35px rgba(255, 71, 87, 0.4), 0 0 0 1px rgba(255, 71, 87, 0.8) !important;
}

/* InShot Magnetic Boundary & Alignment Guides */
.inshot-frame-guides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 85;
}

.inshot-guide-line {
  position: absolute;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.inshot-guide-line.active {
  opacity: 1;
}

.inshot-guide-line.guide-top {
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--inshot-yellow, #ffd32a);
  box-shadow: 0 0 8px rgba(255, 211, 42, 0.85);
}

.inshot-guide-line.guide-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--inshot-yellow, #ffd32a);
  box-shadow: 0 0 8px rgba(255, 211, 42, 0.85);
}

.inshot-guide-line.guide-left {
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--inshot-yellow, #ffd32a);
  box-shadow: 0 0 8px rgba(255, 211, 42, 0.85);
}

.inshot-guide-line.guide-right {
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  background: var(--inshot-yellow, #ffd32a);
  box-shadow: 0 0 8px rgba(255, 211, 42, 0.85);
}

.inshot-guide-line.guide-center-x {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  border-left: 1.5px dashed var(--inshot-yellow, #ffd32a);
  box-shadow: 0 0 6px rgba(255, 211, 42, 0.7);
}

.inshot-guide-line.guide-center-y {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  border-top: 1.5px dashed var(--inshot-yellow, #ffd32a);
  box-shadow: 0 0 6px rgba(255, 211, 42, 0.7);
}

/* InShot Frame Overflow Warning Badge */
.frame-overflow-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  background: rgba(235, 47, 47, 0.94);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  z-index: 95;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.frame-overflow-badge.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ratio-16-9 {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: 100%;
}

.ratio-9-16 {
  aspect-ratio: 9 / 16;
  max-width: 100%;
  max-height: 100%;
}

.ratio-1-1 {
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
}

.ratio-4-5 {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  max-height: 100%;
}

#media-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

video,
canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* Zoom Level Indicator */
.zoom-level-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 45;
}

.zoom-level-badge.visible {
  opacity: 1;
}

/* InShot Signature 4-Corner Handle Text Box (Mobile Touch & Desktop Optimized) */
.inshot-text-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  border: 1.5px dashed var(--inshot-yellow);
  background: rgba(0, 0, 0, 0.35);
  cursor: move;
  z-index: 50;
  display: none;
  /* 기본 숨김 처리: 텍스트 탭이나 자막 트랙 터치 시 활성화 */
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  border-radius: 4px;
}

.inshot-text-box.deselected {
  border-color: transparent !important;
  background: transparent !important;
}

.inshot-text-box.deselected .handle-btn {
  display: none !important;
}

.inshot-text-val {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
  line-height: 1.35;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.85);
  user-select: none;
  display: inline-block;
  cursor: text;
}

/* Magnetic Angle Snapping Visual State ("걸리는 느낌" 표시) */
.inshot-text-box.snapped-angle {
  border-color: #ccff00 !important;
  border-style: solid !important;
  box-shadow: 0 0 16px rgba(204, 255, 0, 0.75) !important;
}

/* Cross-Canvas Magnetic Alignment Guides */
.text-snap-guide {
  position: absolute;
  pointer-events: none;
  z-index: 48;
  display: none;
}

.text-snap-guide.horizontal {
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(204, 255, 0, 0.95), transparent);
  box-shadow: 0 0 8px rgba(204, 255, 0, 0.85);
}

.text-snap-guide.vertical {
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: linear-gradient(180deg, transparent, rgba(204, 255, 0, 0.95), transparent);
  box-shadow: 0 0 8px rgba(204, 255, 0, 0.85);
}

.btn-sub-action {
  background: #1c2230;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.btn-sub-action:hover,
.btn-sub-action:active {
  background: #2a3346;
  border-color: var(--inshot-yellow);
  color: #fff;
}

.subtitle-bar.selected {
  border: 1.5px solid var(--inshot-yellow) !important;
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.8) !important;
  z-index: 10 !important;
}

.handle-btn {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--inshot-coral);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  border: 1.5px solid #fff;
  touch-action: none;
}

/* Hitbox expansion for effortless mobile finger tapping */
.handle-btn::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
}

.handle-tl {
  top: -13px;
  left: -13px;
}

.handle-tr {
  top: -13px;
  right: -13px;
}

.handle-bl {
  bottom: -13px;
  left: -13px;
}

.handle-br {
  bottom: -13px;
  right: -13px;
  background: var(--inshot-yellow);
  color: #000;
}

/* ========================================================
       [데스크톱 전용] 실시간 경기 통계 사이드 패널 (토글 가능)
       ======================================================== */
.viewport-box.has-side-stats {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  padding: 8px 16px !important;
  box-sizing: border-box !important;
}

body.mode-tennis .web-live-stats-panel {
  display: flex;
  flex-direction: column;
  width: 360px;
  min-width: 320px;
  max-width: 400px;
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  z-index: 25;
  flex-shrink: 0;
  box-sizing: border-box;
  cursor: default;
  user-select: none;
}

.live-stats-panel-header {
  padding: 8px 12px;
  background: #181c26;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.live-stats-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-stats-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: liveDotPulse 1.2s infinite ease-in-out;
}

@keyframes liveDotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.live-stats-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.live-stats-badge {
  font-size: 9.5px;
  font-weight: 900;
  color: #020617;
  background: #10b981;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.2;
}

.live-stats-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-live-stats-act {
  background: #1c202c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-live-stats-act:hover {
  background: #282e3f;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.live-stats-panel-content {
  padding: 10px;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: thin;
  color: #e2e8f0;
  font-size: 11.5px;
}

.btn-open-live-stats-side {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  background: #181c26;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-open-live-stats-side:hover {
  background: #252b3b;
  border-color: #38bdf8;
  color: #38bdf8;
}

/* ========================================================
       Authentic Wimbledon TV Broadcast Scoreboard (100% Match with Image 2)
       ======================================================== */
.wimbledon-scoreboard {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  background: #000;
  padding: 1.5px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 214, 0, 0.65);
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
  z-index: 40;
  user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  cursor: grab;
  width: fit-content;
  transform-origin: top left;
  transition: transform 0.05s ease-out;
}

/* [방송 표준] 점수판 바로 오른쪽 상단 실시간 지표 티커 (화면 기본 노출 옵션, 바깥 테두리 없음, 항상 스코어 오른쪽 고정) */
.ws-sub-stat-strip {
  display: flex;
  position: absolute;
  top: 0;
  left: calc(100% + 6px) !important;
  right: auto !important;
  align-items: center;
  gap: 6px;
  height: 26px;
  max-width: calc(100vw - 30px);
  background: rgba(10, 16, 24, 0.94);
  border: none;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  color: #f3f4f6;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
  z-index: 45;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: wsSideFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ws-sub-stat-strip.ws-ticker-pulse {
  animation: wsTickerPulse 0.4s ease-out;
}

@keyframes wsTickerPulse {
  0% {
    transform: scale(0.96);
    filter: brightness(1.3);
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.6);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes wsSideFadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ws-sub-stat-strip.ws-strip-hiding {
  animation: wsSideFadeOut 0.28s ease-in forwards;
}

@keyframes wsSideFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateX(-8px);
  }
}

.ws-sub-stat-badge {
  background: #ffd600;
  color: #000;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.ws-sub-stat-text {
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.ws-sub-stat-text b {
  color: #ffd600;
}

.wimbledon-scoreboard *,
.live-watermark * {
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.btn-sb-pos.active,
.btn-logo-pos.active {
  background: #ffd600 !important;
  color: #000 !important;
  font-weight: 900 !important;
}

.wimbledon-scoreboard:active {
  cursor: grabbing;
}

/* Scoreboard Corner Scale Handle (Touch target 50px) */
.ws-resize-handle {
  position: absolute;
  bottom: -11px;
  right: -11px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--inshot-yellow);
  color: #000;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: nwse-resize;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  touch-action: none;
  z-index: 55;
  border: 2px solid #fff;
  user-select: none;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.wimbledon-scoreboard:hover .ws-resize-handle,
.wimbledon-scoreboard:active .ws-resize-handle {
  opacity: 1;
}

.ws-resize-handle::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
}

@media (max-width: 640px),
(pointer: coarse) {
  .ws-resize-handle {
    opacity: 0.95 !important;
    width: 32px !important;
    height: 32px !important;
    bottom: -13px !important;
    right: -13px !important;
    font-size: 14px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 214, 0, 0.8) !important;
  }

  .ws-resize-handle::before {
    top: -15px !important;
    left: -15px !important;
    right: -15px !important;
    bottom: -15px !important;
  }
}

/* Scoreboard Settings Gear Button */
.ws-gear-btn {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1c1c20;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffd600;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  z-index: 50;
  padding: 0;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.wimbledon-scoreboard:hover .ws-gear-btn,
.wimbledon-scoreboard:active .ws-gear-btn {
  opacity: 1;
}

.ws-gear-btn::before {
  content: '';
  position: absolute;
  top: -14px;
  left: -14px;
  right: -14px;
  bottom: -14px;
}

.ws-gear-btn:active {
  transform: scale(0.9);
}

.ws-row {
  display: flex;
  height: 26px;
  align-items: stretch;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: filter 0.15s;
}

.ws-row:active {
  filter: brightness(1.3);
}

@keyframes scoreFlash {
  0% {
    filter: brightness(1);
  }

  40% {
    filter: brightness(2) contrast(1.2);
  }

  100% {
    filter: brightness(1);
  }
}

.ws-row.just-scored {
  animation: scoreFlash 0.35s ease-out;
}

/* Left: Deep Wimbledon Green Name & Sets Block */
.ws-name-block {
  background: linear-gradient(180deg, #184c31 0%, #0d3420 100%);
  display: flex;
  align-items: center;
  padding: 0 4px 0 7px;
  min-width: 0;
  max-width: 240px;
  flex: 1;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22);
  border-right: 2px solid rgba(0, 0, 0, 0.6);
  border-radius: 2px 0 0 2px;
}

.ws-player-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Arial Black", "Arial", sans-serif;
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95);
}

.ws-server-bar {
  width: 4px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
  margin: 0 1px 0 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ws-row.is-serving .ws-server-bar {
  background: #ffd600;
  box-shadow: 0 0 8px #ffd600;
}

.ws-sets {
  font-family: -apple-system, BlinkMacSystemFont, "Arial Black", "Arial", sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  min-width: 14px;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95);
}

/* Right: Wimbledon Royal Purple Games & Points Block */
.ws-score-block {
  background: linear-gradient(180deg, #4f2764 0%, #351745 100%);
  display: flex;
  align-items: stretch;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border-radius: 0 2px 2px 0;
}

.ws-cell {
  width: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Arial Black", "Arial", sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #ffe600;
  /* Signature Wimbledon Gold in Image 2 */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.95);
  border-left: 1.5px solid rgba(0, 0, 0, 0.45);
}

.ws-cell.ws-points {
  width: 29px;
  background: rgba(0, 0, 0, 0.15);
}

/* ========================================================
       3. InShot Action Bar (Undo, Redo, Split, Delete, Play)
       ======================================================== */
section.action-bar {
  height: 44px;
  background: var(--inshot-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-top: 1px solid var(--inshot-border);
  flex-shrink: 0;
  z-index: 70;
}

.action-left,
.action-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Header Mode Toggle Switch (일반 모드 vs 테니스 컷 모드) */
.mode-toggle-group {
  display: flex;
  align-items: center;
  background: var(--inshot-surface);
  border: 1px solid var(--inshot-border);
  border-radius: 18px;
  padding: 2px;
  gap: 2px;
}

.btn-mode-pill {
  background: none;
  border: none;
  color: #999;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mode-pill.active {
  background: #333338;
  color: #fff;
}

.btn-mode-pill.special-tennis-pill.active {
  background: var(--inshot-tennis);
  color: #000;
  font-weight: 900;
}

/* ========================================================
       3. InShot Clean Action Bar (100% InShot Pure 1:1 Layout)
       ======================================================== */
section.inshot-action-bar {
  height: 44px;
  background: var(--inshot-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-top: 1px solid var(--inshot-border);
  flex-shrink: 0;
  z-index: 70;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-icon {
  background: none;
  border: none;
  color: #ddd;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn-action-icon::before {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -4px;
  right: -4px;
}

.btn-action-icon:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-action-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }
}

/* [사용자 요청] 수정 뒤로가기(Undo) / 앞으로가기(Redo) 버튼 확대 & 세련된 디자인 */
#btn-undo,
#btn-redo {
  width: 42px;
  height: 42px;
  font-size: 21px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.15s ease;
  cursor: pointer;
}

#btn-undo:hover,
#btn-redo:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.55);
  color: #00e5ff;
  transform: translateY(-1px);
}

#btn-undo:active,
#btn-redo:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.28);
}

.btn-action-icon.btn-play-pill {
  background: #ffffff;
  color: #000000;
  font-size: 16px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-action-icon.btn-play-pill:active {
  transform: scale(0.92);
  filter: brightness(0.9);
}

@media (hover: hover) and (pointer: fine) {
  .btn-action-icon.btn-play-pill:hover {
    background: #f0f0f0;
    color: #000;
  }
}

.action-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-autocut-toggle {
  background: rgba(204, 255, 0, 0.12);
  border: 1px solid rgba(204, 255, 0, 0.45);
  color: var(--inshot-tennis);
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-action-autocut-toggle:active {
  transform: scale(0.95);
}

.btn-action-autocut-toggle.is-off {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #777;
  box-shadow: none;
}

.time-code {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #888;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.time-code .current-t {
  color: #fff;
}

/* ========================================================
       3-A. Preview Speed Control & Popover (터치 스크롤 / 슬라이더 조절 & 모바일/웹 무결점 레이아웃)
       ======================================================== */
section.inshot-action-bar {
  position: relative;
}

.quick-speed-wrapper {
  position: static;
  display: inline-flex;
  align-items: center;
}

/* [사용자 요청] 배속 버튼 옆 빈 공간 전용: 랠리시작/끝 상태 체인지 버튼 */
.btn-action-rally-swap {
  width: auto !important;
  height: 32px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.38);
  color: #00e5ff;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.btn-action-rally-swap:hover {
  background: rgba(0, 229, 255, 0.22);
  border-color: #00e5ff;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-action-rally-swap:active {
  transform: scale(0.94);
}

.btn-action-rally-swap .swap-icon {
  font-size: 12px;
  display: inline-block;
  transition: transform 0.25s ease;
}

.btn-action-rally-swap:active .swap-icon {
  transform: rotate(180deg);
}

/* 랠리 녹화(진행) 중일 때의 눈에 띄는 시각적 피드백 */
.btn-action-rally-swap.is-recording {
  background: rgba(255, 59, 92, 0.18);
  border-color: rgba(255, 59, 92, 0.65);
  color: #ff4757;
  animation: swapPulse 1.8s infinite ease-in-out;
}

@keyframes swapPulse {

  0%,
  100% {
    border-color: rgba(255, 59, 92, 0.5);
    box-shadow: 0 0 4px rgba(255, 59, 92, 0.2);
  }

  50% {
    border-color: rgba(255, 59, 92, 0.95);
    box-shadow: 0 0 10px rgba(255, 59, 92, 0.45);
  }
}

.btn-action-rally-swap .swap-label-short {
  display: none;
}

@media (max-width: 480px) {
  .btn-action-rally-swap .swap-label-full {
    display: none;
  }

  .btn-action-rally-swap .swap-label-short {
    display: inline;
  }
}

.preview-speed-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  right: 8px;
  width: auto;
  max-width: 380px;
  background: #1c1c22;
  border: 1.5px solid rgba(204, 255, 0, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 14px rgba(204, 255, 0, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  z-index: 1000;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: speedPopoverFadeIn 0.15s ease-out;
}

@keyframes speedPopoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.speed-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.speed-popover-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #ccc;
}

.speed-popover-current {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--inshot-tennis);
  font-family: monospace;
  background: rgba(204, 255, 0, 0.12);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(204, 255, 0, 0.3);
}

.speed-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.speed-limit-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #777;
  flex-shrink: 0;
}

.speed-range-slider {
  flex: 1 1 0%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.speed-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--inshot-tennis);
  border: 2px solid #000;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.1s;
}

.speed-range-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.speed-chips-scroll {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  padding-bottom: 2px;
  box-sizing: border-box;
}

.speed-chips-scroll::-webkit-scrollbar {
  display: none;
}

.speed-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #bbb;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 2px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  min-width: 0;
}

.speed-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.speed-chip:active {
  transform: scale(0.92);
}

.speed-chip.active {
  background: var(--inshot-tennis);
  color: #000;
  border-color: var(--inshot-tennis);
  font-weight: 900;
  box-shadow: 0 0 8px rgba(204, 255, 0, 0.35);
}

/* Speed Drawer Grid for Mobile & Web (오른쪽 잘림 없는 반응형 그리드) */
.speed-drawer-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.speed-drawer-presets-grid .font-card {
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speed-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.speed-notice-text {
  font-size: 9.5px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.btn-speed-reset {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ddd;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-speed-close {
  background: none;
  border: none;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

.btn-speed-close:hover {
  color: #fff;
}

/* ========================================================
       3-B. Tennis Submode Container: [영상 컷 모드] vs [점수 입력 모드]
       ======================================================== */
.tennis-submode-container {
  display: flex;
  flex-direction: column;
  background: #141716;
  border-top: 1px solid rgba(204, 255, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  z-index: 75;
  box-sizing: border-box;
  width: 100%;
}

body.mode-tennis .tennis-submode-container {
  display: flex !important;
}

body.mode-general .tennis-submode-container {
  display: none !important;
}

/* ========================================================
       3-B. Tennis Score Point Bar (위아래 직관적 배치 & 터치 영역 확장)
       상단: 팀 A / 하단: 팀 B (윔블던/방송 스코어보드 표준 1:1 직관성)
       좌측: 세트/게임/포인트 현황 & 취소 버튼
       ======================================================== */

.tennis-score-point-bar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  height: var(--point-bar-height, 104px);
  padding: 3px 6px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  transition: height 0.15s ease;
}

.score-point-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  padding: 3px 6px;
  min-width: 100px;
  max-width: 124px;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.score-status-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
}

.score-status-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.score-status-row:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.14);
}

.direct-server-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 8px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-sizing: border-box;
}

.direct-server-btn:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.12);
}

.direct-server-btn.active {
  background: rgba(255, 214, 0, 0.16) !important;
  border-color: #ffd600 !important;
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.35);
}

.score-match-set {
  font-size: 9.5px;
  font-weight: 800;
  color: #999;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.score-match-points {
  font-family: monospace, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 900;
  color: var(--inshot-tennis);
  white-space: nowrap;
  letter-spacing: 1px;
  line-height: 1.1;
}

.score-center-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
}

.btn-point-undo {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  justify-content: center;
}

.btn-point-undo:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.25);
}

.score-point-teams-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  justify-content: stretch;
}

.score-point-teams-col.is-court-flipped {
  flex-direction: column-reverse;
}

.score-point-teams-col.is-court-flipped .score-player-slots {
  flex-direction: row-reverse;
}

.btn-score-point {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  border-radius: 8px;
  border: 1px solid transparent;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  color: #fff;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-sizing: border-box;
  overflow: hidden;
}

.btn-score-point-a {
  background: linear-gradient(90deg, #09477b, #0080ff);
  border-color: rgba(0, 145, 255, 0.45);
}

.btn-score-point-b {
  background: linear-gradient(90deg, #871329, var(--inshot-coral));
  border-color: rgba(251, 44, 83, 0.45);
}

/* 좌측: 선수 이름 칸 (범실자 원터치 체크 & 상대팀 자동 +1P 영역) - 폭 확장 및 경계 강화 */
.score-btn-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 0 0 68%;
  width: 68%;
  max-width: 68%;
  height: 100%;
  padding: 3px 5px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: auto;
  border-right: 3px solid rgba(0, 0, 0, 0.85);
  box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.26);
  border-radius: 6px 0 0 6px;
}

.score-team-tag {
  font-size: 9px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 3.5px;
  border-radius: 4px;
  letter-spacing: 0.1px;
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

/* 복식 및 단식 선수 개인 칸 (터치 시 해당 선수 범실 체크 + 상대팀 자동 +1P) */
.score-player-slots {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  pointer-events: auto;
}

.score-player-cell {
  flex: 1 1 0%;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  font-size: 13.5px;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
  box-sizing: border-box;
  line-height: 1.25;
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  user-select: none;
  touch-action: manipulation;
}

.score-player-cell:hover {
  background: rgba(244, 63, 94, 0.28);
  border-color: rgba(251, 113, 133, 0.75);
}

.score-player-cell:active {
  transform: scale(0.95);
  filter: brightness(1.2);
}

/* 선수별 단축키 번호 배지 & 누적 범실 표시 */
.pcell-key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffd600;
  font-size: 10px;
  font-weight: 900;
  margin-right: 3px;
  flex-shrink: 0 !important;
  line-height: 1;
}

.pcell-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.pcell-ue-count {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  color: #fda4af;
  margin-left: 3px;
  background: rgba(225, 29, 72, 0.35);
  border: 1px solid rgba(244, 63, 94, 0.5);
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* [모바일 세로모드(Portrait)] 범실 수치(💥 N)가 선수 번호(1,2,3,4)와 이름을 가리지 않도록 숨김 */
@media (max-width: 900px),
(hover: none) and (pointer: coarse) {
  body:not(.mobile-landscape-mode) .pcell-ue-count {
    display: none !important;
  }
}

@media (orientation: portrait) and (max-width: 1024px) {
  body:not(.mobile-landscape-mode) .pcell-ue-count {
    display: none !important;
  }
}

/* 범실자(UE)로 체크된 선수 칸 하이라이트 */
.score-player-cell.active-ue-player {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.78) 0%, rgba(190, 18, 60, 0.92) 100%) !important;
  border: 1.5px solid #fda4af !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.7), inset 0 0 4px rgba(255, 255, 255, 0.35) !important;
}

.score-player-cell.active-ue-player::before {
  content: '💥';
  font-size: 10px;
  margin-right: 2px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* 선수 개인 칸 서브 반짝임 표시 (황금빛 펄스 & 반짝임 애니메이션) */
.score-player-cell.is-serving-player {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.38) 0%, rgba(255, 245, 157, 0.22) 100%) !important;
  border: 1.5px solid #ffd600 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  text-shadow: 0 0 6px rgba(255, 214, 0, 0.8), 0 1px 2px #000;
  animation: serverCellSparkle 1.25s infinite ease-in-out;
  position: relative;
}

.score-player-cell.is-serving-player::after {
  content: none !important;
  display: none !important;
}

@keyframes serverCellSparkle {

  0%,
  100% {
    box-shadow: 0 0 7px rgba(255, 214, 0, 0.65), inset 0 0 4px rgba(255, 214, 0, 0.35);
    border-color: #ffd600;
  }

  50% {
    box-shadow: 0 0 16px rgba(255, 235, 59, 0.95), 0 0 22px rgba(255, 214, 0, 0.5), inset 0 0 8px rgba(255, 245, 157, 0.6);
    border-color: #ffffff;
  }
}

@keyframes sparkleTwinkle {
  0% {
    opacity: 0.5;
    transform: scale(0.85);
  }

  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 팀 서브 네온 효과 유지 */
.btn-score-point.is-serving {
  border: 2px solid #ffd600 !important;
  box-shadow: 0 0 14px rgba(255, 214, 0, 0.55), inset 0 0 6px rgba(255, 214, 0, 0.25) !important;
}

/* 우측: 점수 표현되는 칸 (터치 시 해당 팀 직접 +1P 득점 & 랠리 자동 컷) - 명확한 독립 터치 타일 */
.score-btn-right {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 32%;
  width: 32%;
  max-width: 32%;
  height: 100%;
  padding: 3px 4px;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: background 0.15s ease, transform 0.1s ease, filter 0.15s ease;
  background: rgba(0, 0, 0, 0.44);
  border-left: 2.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.8), inset 1px 0 5px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border-radius: 0 6px 6px 0;
}

.btn-score-point-a .score-btn-right {
  background: linear-gradient(135deg, rgba(0, 30, 80, 0.72) 0%, rgba(0, 70, 160, 0.82) 100%);
}

.btn-score-point-b .score-btn-right {
  background: linear-gradient(135deg, rgba(80, 10, 25, 0.72) 0%, rgba(140, 18, 50, 0.82) 100%);
}

.score-btn-right:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  filter: brightness(1.25);
}

.score-btn-right:active {
  transform: scale(0.97);
  background: rgba(255, 214, 0, 0.35) !important;
  filter: brightness(1.35);
}

.score-bar-board-block {
  display: flex;
  align-items: stretch;
  flex: 0 1 auto;
  height: 25px;
  background: linear-gradient(180deg, #4f2764 0%, #351745 100%);
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 1px 4px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  pointer-events: none;
}

.sb-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0%;
  padding: 0 3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Arial Black", "Arial", sans-serif;
  font-size: 12px;
  font-weight: 900;
  color: #ffe600;
  /* Signature Wimbledon Gold */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.95);
  border-left: 1px solid rgba(0, 0, 0, 0.45);
  min-width: 17px;
  line-height: 1;
}

.sb-cell:first-child {
  border-left: none;
}

.sb-cell.sb-points {
  min-width: 24px;
  background: rgba(0, 0, 0, 0.24);
}

.score-plus-badge {
  font-size: 10.5px;
  font-weight: 900;
  color: #ffd600;
  background: rgba(0, 0, 0, 0.42);
  padding: 2px 5px;
  border-radius: 5px;
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid rgba(255, 214, 0, 0.45);
  line-height: 1.3;
  pointer-events: none;
}

/* 득점 팀 선택 시 활성화 하이라이트 */
.btn-score-point.point-winner-active {
  border: 2px solid #ffd600 !important;
  box-shadow: 0 0 16px rgba(255, 214, 0, 0.55), inset 0 0 8px rgba(255, 214, 0, 0.25) !important;
  filter: brightness(1.18);
}

.btn-score-point.point-winner-active .score-plus-badge {
  background: #ffd600 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  border-color: #fff !important;
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.8) !important;
}

/* ========================================================
       [신규] 모바일/웹 스와이프 코트 패드 편집 모드 (Swipe Court Pad)
       - 사각형 패드 중앙 -> 상/하 스와이프: 팀 A / 팀 B +1P
       - 4코너 -> 중앙 대각선 스와이프: 서버 폴트(1회) / 더블폴트(2회) / 리시버 리턴에러
       - 4코너 가볍게 터치(Tap): 해당 선수 범실(UE) 체크 + 상대팀 자동 +1P
       ======================================================== */
/* [신규] 상단 헤더 스와이프모드 토글 단추 */
.btn-top-swipe-toggle,
#btn-swipe-mode-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  border-radius: 18px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  height: 28px;
  margin: 0;
  box-sizing: border-box;
  user-select: none;
}

.btn-top-swipe-toggle:hover,
#btn-swipe-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.4);
  color: #fff;
}

.btn-top-swipe-toggle.active-swipe,
#btn-swipe-mode-toggle.active-swipe {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(14, 165, 233, 0.32));
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

/* [신규] 포인트 입력창 단일 점수수정 단추 */
.btn-point-single-edit {
  width: 100%;
  height: 100%;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.16) 0%, rgba(255, 171, 0, 0.24) 100%);
  border: 1.5px solid rgba(255, 214, 0, 0.55);
  border-radius: 10px;
  color: #ffd600;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px rgba(255, 214, 0, 0.14);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 4px;
  box-sizing: border-box;
}

.btn-point-single-edit:hover {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.28) 0%, rgba(255, 171, 0, 0.38) 100%);
  border-color: #ffd600;
  box-shadow: 0 4px 16px rgba(255, 214, 0, 0.32);
  transform: translateY(-1px);
}

.btn-point-single-edit:active {
  transform: scale(0.96);
  background: rgba(255, 214, 0, 0.32);
}

.btn-point-single-edit .edit-btn-icon {
  font-size: 17px;
  line-height: 1;
}

.btn-point-single-edit .edit-btn-text {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

body.tennis-swipe-pad-active .tennis-score-point-bar {
  height: calc(var(--point-bar-height, 104px) + 92px);
  min-height: 186px;
}

body.tennis-swipe-pad-active #precision-serve-chip-row {
  display: none !important;
}

body.tennis-swipe-pad-active #score-point-teams-col {
  display: none !important;
}

.swipe-court-pad-container {
  display: none;
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0d2238;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), inset 0 0 18px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: pointer;
  box-sizing: border-box;
}

body.tennis-swipe-pad-active .swipe-court-pad-container {
  display: flex;
  flex-direction: column;
}

.swipe-court-grid {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  pointer-events: none;
}

.swipe-quad {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 7px;
  box-sizing: border-box;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.swipe-quad-a1,
.swipe-quad-a2 {
  background: linear-gradient(180deg, rgba(9, 71, 123, 0.88) 0%, rgba(0, 110, 215, 0.72) 100%);
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.6);
}

.swipe-quad-b1,
.swipe-quad-b2 {
  background: linear-gradient(0deg, rgba(135, 19, 41, 0.88) 0%, rgba(215, 38, 78, 0.72) 100%);
  border-top: 1.5px dashed rgba(255, 255, 255, 0.6);
}

.swipe-quad-a1,
.swipe-quad-b1 {
  border-right: 1.5px solid rgba(255, 255, 255, 0.5);
}

.swipe-court-grid.is-flipped #swipe-quad-b2 {
  order: 1;
}

.swipe-court-grid.is-flipped #swipe-quad-b1 {
  order: 2;
}

.swipe-court-grid.is-flipped #swipe-quad-a2 {
  order: 3;
}

.swipe-court-grid.is-flipped #swipe-quad-a1 {
  order: 4;
}

.swipe-court-grid.is-flipped .swipe-quad-a1,
.swipe-court-grid.is-flipped .swipe-quad-b1 {
  border-right: none;
}

.swipe-court-grid.is-flipped .swipe-quad-a2,
.swipe-court-grid.is-flipped .swipe-quad-b2 {
  border-right: 1.5px solid rgba(255, 255, 255, 0.5);
}

.swipe-court-grid.is-flipped .swipe-quad-b1,
.swipe-court-grid.is-flipped .swipe-quad-b2 {
  background: linear-gradient(180deg, rgba(135, 19, 41, 0.88) 0%, rgba(215, 38, 78, 0.72) 100%);
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.6);
  border-top: none;
}

.swipe-court-grid.is-flipped .swipe-quad-a1,
.swipe-court-grid.is-flipped .swipe-quad-a2 {
  background: linear-gradient(0deg, rgba(9, 71, 123, 0.88) 0%, rgba(0, 110, 215, 0.72) 100%);
  border-top: 1.5px dashed rgba(255, 255, 255, 0.6);
  border-bottom: none;
}

.swipe-quad.is-serving-quad {
  box-shadow: inset 0 0 0 2px #ffd600, inset 0 0 14px rgba(255, 214, 0, 0.45);
}

.swipe-quad.is-receiving-quad {
  box-shadow: inset 0 0 0 1.5px #38bdf8, inset 0 0 12px rgba(56, 189, 248, 0.35);
}

.swipe-quad.is-ue-active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.92), rgba(159, 18, 57, 0.95)) !important;
  box-shadow: inset 0 0 0 2px #fda4af !important;
}

.swipe-quad.gesture-hover {
  filter: brightness(1.3);
}

.swipe-quad-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.swipe-quad-name {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.swipe-quad-role-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  display: none;
}

.swipe-quad.is-serving-quad .swipe-quad-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #ffd600;
  color: #09131c;
  box-shadow: 0 1px 5px rgba(255, 214, 0, 0.6);
}

.swipe-quad.is-serving-quad.serve-2nd-state .swipe-quad-role-badge {
  background: #fb923c;
  color: #000;
}

.swipe-quad.is-serving-quad.serve-df-state .swipe-quad-role-badge {
  background: #ef4444;
  color: #fff;
}

.swipe-quad.is-receiving-quad .swipe-quad-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid #38bdf8;
  color: #e0f2fe;
}

.swipe-quad-hint {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 중앙 네트 허브 (상/하 스와이프 +1P & 실시간 스코어 배지) */
.swipe-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  background: rgba(9, 15, 26, 0.92);
  border: 1.5px solid rgba(255, 214, 0, 0.8);
  border-radius: 999px;
  padding: 3px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 214, 0, 0.25);
  pointer-events: none;
  white-space: nowrap;
}

.swipe-hub-team-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 900;
}

.swipe-hub-team-score.team-a {
  color: #60a5fa;
}

.swipe-hub-team-score.team-b {
  color: #fb7185;
}

.swipe-hub-pts {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffd600;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

.swipe-hub-divider {
  font-size: 9.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
}

/* 스와이프 궤적 캔버스 & 실시간 액션 프리뷰 배지 */
.swipe-trail-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

.swipe-live-action-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 12;
  background: rgba(10, 16, 28, 0.96);
  border: 2px solid #ccff00;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.9), 0 0 14px rgba(204, 255, 0, 0.5);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.swipe-live-action-pill.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}



.score-team-name {
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.btn-point-serve {
  color: #ffd600;
  border-color: rgba(255, 214, 0, 0.5);
  background: rgba(255, 214, 0, 0.12);
}

.btn-point-layout {
  color: #ffd600;
  border-color: rgba(255, 214, 0, 0.35);
  background: rgba(255, 214, 0, 0.08);
}

.btn-point-undo:active,
.btn-point-serve:active,
.btn-point-gear:active,
.btn-point-layout:active {
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.score-serve-badge {
  font-size: 9px;
  font-weight: 900;
  color: #000;
  background: #ffd600;
  padding: 1px 4.5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.server-modal-box {
  background: #1c1c22;
  border: 1.5px solid rgba(255, 214, 0, 0.4);
  border-radius: 16px;
  padding: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 214, 0, 0.2);
}

.server-select-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.server-card-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.server-card-btn:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.15);
}

.server-card-btn.active-server {
  background: rgba(255, 214, 0, 0.15);
  border-color: #ffd600;
  box-shadow: 0 0 12px rgba(255, 214, 0, 0.35);
}

/* Batch Score Adjust & Shift Sync Styles */
.btn-point-batch {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.btn-point-batch:active {
  transform: scale(0.93);
  background: rgba(0, 229, 255, 0.35);
  color: #fff;
}

/* Rally Start / End State Swap Badge on tool-rally-start */
.btn-rally-swap-state {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #18181b;
  border: 1.5px solid #00e5ff;
  color: #00e5ff;
  font-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: all 0.18s ease;
  z-index: 10;
  user-select: none;
}

.btn-rally-swap-state:hover,
.btn-rally-swap-state:active {
  transform: scale(1.15) rotate(180deg);
  background: #00e5ff;
  color: #000;
}

/* Separated Rally Start & Rally End Buttons in Bottom Toolbar (Enlarged & Prominent for Quick Thumbs!) */
.tool-item.tool-rally-start,
.tool-item.tool-one-touch-rally {
  min-width: 68px;
  height: 48px;
  background: linear-gradient(135deg, rgba(204, 255, 0, 0.22), rgba(0, 230, 118, 0.16));
  border: 1.5px solid var(--inshot-tennis);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(204, 255, 0, 0.22);
  color: #ccff00;
  font-weight: 900;
  padding: 2px 6px;
  box-sizing: border-box;
}

.tool-item.tool-rally-start .tool-icon,
.tool-item.tool-one-touch-rally .tool-icon {
  font-size: 20px;
  height: 22px;
  line-height: 1;
}

.tool-item.tool-rally-start .tool-name,
.tool-item.tool-one-touch-rally .tool-name {
  font-size: 11px;
  color: #ccff00;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.15;
}

.tool-item.tool-rally-start.is-recording,
.tool-item.tool-one-touch-rally.is-recording {
  background: linear-gradient(135deg, rgba(251, 44, 83, 0.45), rgba(224, 32, 69, 0.35));
  border-color: #ff3b5c;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(251, 44, 83, 0.7);
}

.tool-item.tool-rally-start.is-recording .tool-name,
.tool-item.tool-one-touch-rally.is-recording .tool-name {
  color: #ffffff;
}

.tool-item.tool-rally-start.is-recording .tool-icon,
.tool-item.tool-one-touch-rally.is-recording .tool-icon {
  animation: rallyPulse 0.8s infinite alternate ease-in-out;
}

/* Fast Forward (빨리감기) Button in Bottom Toolbar */
.tool-item.tool-fast-forward,
.tool-item.tool-rally-end {
  min-width: 66px;
  height: 48px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.16));
  border: 1.5px solid #3b82f6;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  font-weight: 900;
  padding: 2px 6px;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.tool-item.tool-fast-forward .tool-icon,
.tool-item.tool-rally-end .tool-icon {
  font-size: 20px;
  height: 22px;
  line-height: 1;
}

.tool-item.tool-fast-forward .tool-name,
.tool-item.tool-rally-end .tool-name {
  font-size: 11px;
  color: #60a5fa;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.15;
}

.tool-item.tool-fast-forward.is-active,
.tool-item.tool-fast-forward:active,
.tool-item.tool-rally-end.is-active,
.tool-item.tool-rally-end:active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.5));
  border-color: #93c5fd;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.85);
  transform: scale(0.96);
}

.tool-item.tool-fast-forward.is-active .tool-name,
.tool-item.tool-fast-forward:active .tool-name,
.tool-item.tool-rally-end.is-active .tool-name,
.tool-item.tool-rally-end:active .tool-name {
  color: #ffffff;
}

.tool-item.tool-fast-forward.is-active .tool-icon,
.tool-item.tool-fast-forward:active .tool-icon,
.tool-item.tool-rally-end.is-active .tool-icon,
.tool-item.tool-rally-end:active .tool-icon {
  animation: ffPulse 0.45s infinite alternate ease-in-out;
}

@keyframes ffPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px #60a5fa);
  }

  100% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px #93c5fd);
  }
}

@keyframes rallyPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px #ff3b5c);
  }

  100% {
    transform: scale(1.18);
    filter: drop-shadow(0 0 10px #ff3b5c);
  }
}

/* ========================================================
       3-C. InShot Thumb-First Editing Tools & Timeline Split Styling
       [서브시작(S)] [랠리끝(E)] [분할] [삭제] [자동컷]
       ======================================================== */
.tool-item.tool-sac-start {
  color: #ffd600;
  font-weight: 800;
}

.tool-item.tool-sac-start.is-recording {
  color: #ffd600;
}

.tool-item.tool-sac-start.is-recording .tool-icon {
  animation: sacThumbPulse 0.9s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 8px rgba(255, 214, 0, 0.9));
}

@keyframes sacThumbPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px #ffd600);
  }

  100% {
    transform: scale(1.22);
    filter: drop-shadow(0 0 12px #ffd600);
  }
}

.tool-item.tool-sac-end {
  color: #fb2c53;
  font-weight: 800;
}

.tool-item.tool-sac-end:active {
  transform: scale(0.92);
  filter: brightness(1.3);
}

.tool-item.tool-split {
  color: #ffffff;
}

.tool-item.tool-split .tool-icon {
  color: #ffffff;
  font-weight: 900;
}

.tool-item.tool-delete {
  color: #bbb;
}

.tool-item.tool-delete:active {
  color: #fb2c53;
}

.tool-item.tool-autocut {
  min-width: 64px;
  height: 48px;
  color: var(--inshot-coral);
  padding: 2px 6px;
  box-sizing: border-box;
}

/* InShot Split Seam Between Clips on Timeline */
.video-clip {
  position: relative;
  margin: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  box-shadow: none;
}

.video-clip::after {
  content: '';
  position: absolute;
  right: 0px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 1px;
  pointer-events: none;
  z-index: 12;
}

.video-clip:last-child::after {
  display: none;
}

/* Rally Clip Distinct Visual Highlight on Timeline */
.video-clip.is-rally,
.video-clip.is-hl {
  background: #172c1e !important;
  border-color: rgba(0, 230, 118, 0.5) !important;
  border-left: 3.5px solid #00e676 !important;
  color: #e8f5e9 !important;
}

.video-clip.is-rally.selected,
.video-clip.is-hl.selected {
  border: 2.5px solid var(--inshot-yellow) !important;
  background: #203c2a !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 214, 0, 0.7);
}

/* Waiting (Dead-Time) Clip Distinct Visuals on Timeline */
.video-clip.is-waiting {
  background: #1a1a20 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  border-left: 3px dashed rgba(255, 255, 255, 0.35) !important;
  color: #8c8c9a !important;
}

.video-clip.is-waiting.selected {
  border: 2.5px solid var(--inshot-yellow) !important;
  background: #252532 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 214, 0, 0.6);
}

/* Timeline Clip Drag & Drop Reordering Indicators */
.video-clip.is-dragging-clip {
  opacity: 0.38 !important;
  border: 2px dashed #ffd600 !important;
  cursor: grabbing !important;
  transform: scale(0.96);
}

.video-clip.drag-over-left {
  box-shadow: -4px 0 0 2px #00e5ff, 0 0 16px rgba(0, 229, 255, 0.8) !important;
  border-left: 3.5px solid #00e5ff !important;
}

.video-clip.drag-over-right {
  box-shadow: 4px 0 0 2px #00e5ff, 0 0 16px rgba(0, 229, 255, 0.8) !important;
  border-right: 3.5px solid #00e5ff !important;
}

/* Single-Touch Toggle Rally/Waiting Button (클립 랠리/대기 변경) */
.tool-item.tool-toggle-rally {
  min-width: 68px !important;
  padding: 3px 5px !important;
  transition: all 0.18s ease;
}

.tool-item.tool-toggle-rally .tool-name {
  font-size: 10px !important;
  letter-spacing: -0.3px !important;
  line-height: 1.15;
}

.tool-item.tool-toggle-rally.is-active-rally .tool-icon {
  color: #ffd600;
}

.tool-item.tool-toggle-rally.is-active-waiting .tool-icon {
  color: #00e676;
}

.clip-quick-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 214, 0, 0.85);
  color: #ffd600;
  cursor: pointer;
  margin-left: 4px;
  pointer-events: auto !important;
  transition: transform 0.15s, background 0.15s;
}

.clip-quick-toggle-pill:hover {
  transform: scale(1.08);
  background: rgba(255, 214, 0, 0.25);
  color: #ffffff;
}

/* Just-Split Flash Animation for Instant Feedback */
.video-clip.just-split {
  animation: splitFlash 0.35s ease-out;
}

@keyframes splitFlash {
  0% {
    filter: brightness(2.2);
    transform: scaleY(1.08);
  }

  100% {
    filter: brightness(1);
    transform: scaleY(1);
  }
}

/* ========================================================
       3-D. Tennis Motion Graphics: Intro, Outro, Watermark & Confetti
       ======================================================== */
/* 1. 비디오 화면 내부 전용 폭죽 캔버스 (유휴 시 숨김 처리하여 하드웨어 비디오 오버레이 보호) */
#effectCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  display: none;
}

/* 4-② 경기 중 상시 워터마크 (자유 이동 및 4개 모서리 배치 지원 - 내보내기 캔버스와 1:1 표준 일치) */
.live-watermark {
  position: absolute;
  z-index: 25;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.live-watermark:active {
  cursor: grabbing;
}

.live-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 2. 인트로 오버레이 공통 컨테이너 (GPU backdrop-filter 및 JS와 충돌하는 CSS transition 제거) */
.intro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 18;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
}

.intro-banner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  width: 92%;
  max-width: 95%;
  position: relative;
}

.intro-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.intro-logo-wrap img {
  height: 65px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.intro-teams-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 18px;
}

.intro-team {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: center;
}

.intro-player-name {
  display: inline-block;
  text-align: center;
  word-break: keep-all;
}

.intro-team-a {
  justify-content: flex-end;
  text-align: right;
  will-change: transform, opacity;
}

.intro-team-b {
  justify-content: flex-start;
  text-align: left;
  will-change: transform, opacity;
}

.intro-vs-badge {
  flex-shrink: 0;
  will-change: transform, opacity;
}

.intro-desc-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* [테마 1] 윔블던 클래식 대형 배너 (intro-wimbledon - 기본값) */
.intro-wimbledon .intro-banner-box {
  width: 92%;
  max-width: 95%;
  padding: 35px 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 77, 37, 0.96) 0%, rgba(0, 38, 18, 0.96) 100%);
  border: 4px solid #d4af37;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.35);
}

.intro-wimbledon .intro-player-name {
  font-size: 46px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8);
  letter-spacing: -0.5px;
}

.intro-wimbledon .intro-vs-badge {
  background: #d4af37;
  color: #004d25;
  font-size: 28px;
  font-weight: 900;
  border-radius: 8px;
  padding: 4px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.intro-wimbledon .intro-desc-capsule {
  background: #512b58;
  border: 2px solid #d4af37;
  border-radius: 999px;
  padding: 8px 26px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.intro-wimbledon .intro-desc-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
}

/* [테마 2] 롤랑가로스 클레이 대형 배너 (intro-clay) - 현실적인 클레이 흙바닥 질감 + 3D 음각 섀도우 */
.intro-clay .intro-banner-box {
  width: 92%;
  max-width: 95%;
  padding: 35px 50px;
  border-radius: 16px;
  background-color: #c45b36;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.16'/%3E%3C/svg%3E");
  border: 3px solid #8b3a20;
  border-top: 8px solid #fdf5e6;
  border-bottom: 8px solid #fdf5e6;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 30px rgba(196, 91, 54, 0.45);
}

.intro-clay .intro-player-name {
  font-size: 46px;
  font-weight: 900;
  color: #fdf5e6;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #8b3a20, 4px 4px 0 #6e2a15, 6px 6px 15px rgba(0, 0, 0, 0.75);
  letter-spacing: -0.5px;
}

.intro-clay .intro-vs-badge {
  background: #fdf5e6;
  color: #c45b36;
  font-size: 28px;
  font-weight: 900;
  border-radius: 8px;
  padding: 4px 14px;
  box-shadow: 2px 2px 0 #8b3a20, 0 4px 12px rgba(0, 0, 0, 0.5);
}

.intro-clay .intro-desc-capsule {
  background: rgba(30, 15, 10, 0.75);
  border: 2px solid #fdf5e6;
  border-radius: 999px;
  padding: 8px 26px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.intro-clay .intro-desc-text {
  font-size: 22px;
  font-weight: 800;
  color: #fdf5e6;
  letter-spacing: 0.8px;
  text-shadow: 1px 1px 0 #6e2a15;
}

/* [테마 3] 그랜드슬램 스포티 (intro-slam) */
.intro-slam .intro-banner-box {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 10px;
  width: auto;
}

.intro-slam .intro-player-name {
  font-size: 48px;
  font-weight: 900;
  font-style: italic;
  color: #ffffff;
  text-shadow: 3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 0 6px 14px rgba(0, 0, 0, 0.9);
  letter-spacing: -1px;
}

.intro-slam .intro-vs-badge {
  background: transparent;
  color: #ccff00;
  font-size: 70px;
  font-weight: 900;
  font-style: italic;
  text-shadow: 4px 4px 0 #000, -4px -4px 0 #000, 0 0 25px rgba(204, 255, 0, 0.8);
  padding: 0 10px;
}

.intro-slam .intro-desc-capsule {
  background: #000000;
  border: 2px solid #ccff00;
  border-radius: 6px;
  padding: 6px 22px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.intro-slam .intro-desc-text {
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  color: #ccff00;
  letter-spacing: 1px;
}

/* [테마 4] US오픈 나이트 네온 (intro-neon) - 현실적인 네온사인 빛 번짐 + 나이트 래디얼 */
.intro-neon .intro-banner-box {
  width: 92%;
  max-width: 95%;
  padding: 35px 50px;
  border-radius: 18px;
  background: radial-gradient(circle at center, rgba(26, 42, 64, 0.96) 0%, rgba(5, 10, 17, 0.98) 100%);
  border: 2.5px solid #00ffff;
  box-shadow: 0 0 35px rgba(0, 255, 255, 0.45), inset 0 0 25px rgba(255, 0, 255, 0.25);
}

.intro-neon .intro-team-a .intro-player-name {
  font-size: 46px;
  font-weight: 900;
  font-style: italic;
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 80px #ff00ff;
  letter-spacing: -0.5px;
  animation: neonFlickerA 4s infinite;
}

.intro-neon .intro-team-b .intro-player-name {
  font-size: 46px;
  font-weight: 900;
  font-style: italic;
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 20px #ff00ff, 0 0 40px #ff00ff, 0 0 80px #00ffff;
  letter-spacing: -0.5px;
  animation: neonFlickerB 4s infinite;
}

.intro-neon .intro-vs-badge {
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #ff00ff;
  box-shadow: 0 0 20px #ff00ff, inset 0 0 10px #00ffff;
}

.intro-neon .intro-desc-capsule {
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid #00ffff;
  border-radius: 999px;
  padding: 6px 24px;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.6);
}

.intro-neon .intro-desc-text {
  font-size: 22px;
  font-weight: 800;
  color: #00ffff;
  text-shadow: 0 0 12px #00ffff, 0 0 25px #ff00ff;
  letter-spacing: 1.5px;
}

@keyframes neonFlickerA {

  0%,
  2%,
  4% {
    opacity: 0.65;
  }

  1%,
  3%,
  5%,
  100% {
    opacity: 1;
  }
}

@keyframes neonFlickerB {

  0%,
  3%,
  6% {
    opacity: 0.7;
  }

  1%,
  4%,
  7%,
  100% {
    opacity: 1;
  }
}

/* 3. 아웃트로 오버레이 (3대 그랜드슬램 통일 네온 시스템) */
.outro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  z-index: 19;
  pointer-events: auto;
  overflow: hidden;
  transition: background 0.4s ease;
}

.outro-content-box {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 90%;
  max-width: 92%;
  padding: 24px 18px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  will-change: transform;
}

/* 회전 헤일로 (Sunburst) */
.outro-sunburst-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  margin-left: -450px;
  margin-top: -450px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  display: block;
  animation: outroHaloSpin 30s linear infinite;
}

@keyframes outroHaloSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* 4-③ 아웃트로 로고 */
.outro-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.outro-logo-wrap img {
  height: 70px;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.8));
}

.outro-winner-badge {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 7px 26px;
  border-radius: 999px;
  margin-bottom: 12px;
  display: inline-block;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.outro-winner-title {
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.outro-winner-text {
  font-size: 52px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: inline-block;
  word-break: keep-all;
  transition: all 0.3s ease;
}

.outro-neon-underline {
  height: 3.5px;
  width: 100%;
  max-width: 340px;
  border-radius: 2px;
  margin-top: 4px;
  transition: all 0.3s ease;
}

.outro-score-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 24px;
  border-radius: 12px;
  margin-top: 4px;
  transition: all 0.3s ease;
}

.outro-score-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.75);
}

.outro-score-text {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  display: inline-block;
  transition: all 0.3s ease;
}

/* ----------------------------------------------------
       [테마 1] 윔블던 클래식 네온 (outro-wimbledon / outro-burst)
       ---------------------------------------------------- */
.outro-overlay.outro-wimbledon,
.outro-overlay.outro-burst {
  background: radial-gradient(circle at center, rgba(6, 35, 20, 0.95) 0%, rgba(1, 19, 10, 0.98) 100%);
}

.outro-wimbledon .outro-sunburst-halo,
.outro-burst .outro-sunburst-halo {
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 0, 0.25) 0deg 15deg, transparent 15deg 30deg);
}

.outro-wimbledon .outro-content-box,
.outro-burst .outro-content-box {
  background: rgba(5, 34, 18, 0.88);
  border: 3px solid #ffd600;
  box-shadow: 0 0 35px rgba(255, 214, 0, 0.4), inset 0 0 20px rgba(255, 214, 0, 0.2);
  animation: wsNeonBoxPulseGold 2.5s infinite ease-in-out;
}

.outro-wimbledon .outro-winner-badge,
.outro-burst .outro-winner-badge {
  background: linear-gradient(135deg, #ffd600 0%, #d4af37 100%);
  color: #03170c;
  box-shadow: 0 0 15px rgba(255, 214, 0, 0.6);
}

.outro-wimbledon .outro-winner-text,
.outro-burst .outro-winner-text {
  text-shadow: 0 0 10px #ffd600, 0 0 25px rgba(255, 214, 0, 0.6), 0 4px 15px rgba(0, 0, 0, 0.9);
}

.outro-wimbledon .outro-neon-underline,
.outro-burst .outro-neon-underline {
  background: #ffd600;
  box-shadow: 0 0 12px #ffd600, 0 0 24px #ffd600;
}

.outro-wimbledon .outro-score-wrap,
.outro-burst .outro-score-wrap {
  background: rgba(81, 43, 88, 0.85);
  border: 1.5px solid #ffd600;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
}

.outro-wimbledon .outro-score-text,
.outro-burst .outro-score-text {
  color: #ffd600;
  text-shadow: 0 0 10px rgba(255, 214, 0, 0.8);
}

/* ----------------------------------------------------
       [테마 2] 프랑스오픈 테라코타 클레이 네온 (outro-clay / outro-cannon)
       ---------------------------------------------------- */
.outro-overlay.outro-clay,
.outro-overlay.outro-cannon {
  background: radial-gradient(circle at center, rgba(66, 24, 14, 0.95) 0%, rgba(26, 8, 4, 0.98) 100%);
}

.outro-clay .outro-sunburst-halo,
.outro-cannon .outro-sunburst-halo {
  background: repeating-conic-gradient(from 0deg, rgba(255, 111, 60, 0.22) 0deg 15deg, transparent 15deg 30deg);
}

.outro-clay .outro-content-box,
.outro-cannon .outro-content-box {
  background: rgba(41, 16, 9, 0.88);
  border: 3px solid #ff6f3c;
  box-shadow: 0 0 35px rgba(255, 111, 60, 0.4), inset 0 0 20px rgba(255, 111, 60, 0.2);
  animation: wsNeonBoxPulseClay 2.5s infinite ease-in-out;
}

.outro-clay .outro-winner-badge,
.outro-cannon .outro-winner-badge {
  background: linear-gradient(135deg, #ff6f3c 0%, #e65100 100%);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 111, 60, 0.6);
}

.outro-clay .outro-winner-text,
.outro-cannon .outro-winner-text {
  text-shadow: 0 0 10px #ff6f3c, 0 0 25px rgba(255, 111, 60, 0.6), 0 4px 15px rgba(0, 0, 0, 0.9);
}

.outro-clay .outro-neon-underline,
.outro-cannon .outro-neon-underline {
  background: #ff6f3c;
  box-shadow: 0 0 12px #ff6f3c, 0 0 24px #ff6f3c;
}

.outro-clay .outro-score-wrap,
.outro-cannon .outro-score-wrap {
  background: rgba(21, 7, 4, 0.9);
  border: 1.5px solid #ff6f3c;
  box-shadow: 0 0 16px rgba(255, 111, 60, 0.4);
}

.outro-clay .outro-score-text,
.outro-cannon .outro-score-text {
  color: #ffaa5a;
  text-shadow: 0 0 10px rgba(255, 170, 90, 0.8);
}

/* ----------------------------------------------------
       [테마 3] US오픈 나이트 세션 네온 (outro-usopen / outro-fireworks)
       ---------------------------------------------------- */
.outro-overlay.outro-usopen,
.outro-overlay.outro-fireworks {
  background: radial-gradient(circle at center, rgba(10, 37, 64, 0.95) 0%, rgba(3, 10, 18, 0.98) 100%);
}

.outro-usopen .outro-sunburst-halo,
.outro-fireworks .outro-sunburst-halo {
  background: repeating-conic-gradient(from 0deg, rgba(0, 240, 255, 0.20) 0deg 15deg, transparent 15deg 30deg);
}

.outro-usopen .outro-content-box,
.outro-fireworks .outro-content-box {
  background: rgba(6, 19, 36, 0.88);
  border: 3px solid #00f0ff;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.45), inset 0 0 20px rgba(255, 0, 122, 0.25);
  animation: wsNeonBoxPulseUSOpen 2.2s infinite ease-in-out;
}

.outro-usopen .outro-winner-badge,
.outro-fireworks .outro-winner-badge {
  background: linear-gradient(135deg, #00f0ff 0%, #ff007a 100%);
  color: #030a12;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.8);
}

.outro-usopen .outro-winner-text,
.outro-fireworks .outro-winner-text {
  text-shadow: 0 0 12px #00f0ff, 0 0 30px rgba(0, 240, 255, 0.7), 0 0 50px #ff007a;
}

.outro-usopen .outro-neon-underline,
.outro-fireworks .outro-neon-underline {
  background: #00f0ff;
  box-shadow: 0 0 14px #00f0ff, 0 0 28px #ff007a;
}

.outro-usopen .outro-score-wrap,
.outro-fireworks .outro-score-wrap {
  background: rgba(0, 0, 0, 0.9);
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.outro-usopen .outro-score-text,
.outro-fireworks .outro-score-text {
  color: #ccff00;
  text-shadow: 0 0 12px rgba(204, 255, 0, 0.9);
}

/* 네온 펄스 키프레임 */
@keyframes wsNeonBoxPulseGold {

  0%,
  100% {
    box-shadow: 0 0 25px rgba(255, 214, 0, 0.35), inset 0 0 15px rgba(255, 214, 0, 0.2);
    border-color: #ffd600;
  }

  50% {
    box-shadow: 0 0 45px rgba(255, 226, 89, 0.65), inset 0 0 25px rgba(255, 226, 89, 0.35);
    border-color: #fff275;
  }
}

@keyframes wsNeonBoxPulseClay {

  0%,
  100% {
    box-shadow: 0 0 25px rgba(255, 111, 60, 0.35), inset 0 0 15px rgba(255, 111, 60, 0.2);
    border-color: #ff6f3c;
  }

  50% {
    box-shadow: 0 0 45px rgba(255, 154, 60, 0.65), inset 0 0 25px rgba(255, 154, 60, 0.35);
    border-color: #ffaa5a;
  }
}

@keyframes wsNeonBoxPulseUSOpen {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), inset 0 0 15px rgba(255, 0, 122, 0.2);
    border-color: #00f0ff;
  }

  50% {
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.7), inset 0 0 25px rgba(255, 0, 122, 0.35);
    border-color: #80f7ff;
  }
}

/* 5. 텍스트 인라인 수정 스타일 (contenteditable) */
[contenteditable="true"] {
  outline: none;
  cursor: text;
  transition: all 0.2s;
}

[contenteditable="true"]:hover {
  text-decoration: underline dotted rgba(255, 255, 255, 0.5);
}

[contenteditable="true"]:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 4px;
  padding: 0 6px;
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.6);
}

/* 에디터 프리뷰(max-width: 440px) 및 모바일 반응형 1:1 WYSIWYG 배너 스케일링 */
.inshot-editor-app .intro-wimbledon .intro-banner-box,
.inshot-editor-app .intro-clay .intro-banner-box,
.inshot-editor-app .intro-neon .intro-banner-box {
  width: 92% !important;
  max-width: 92% !important;
  padding: 20px 16px !important;
  box-sizing: border-box !important;
}

.inshot-editor-app .intro-player-name {
  font-size: 26px !important;
}

.inshot-editor-app .intro-vs-badge {
  font-size: 18px !important;
  padding: 2px 8px !important;
}

.inshot-editor-app .intro-desc-capsule {
  padding: 5px 14px !important;
}

.inshot-editor-app .intro-desc-text {
  font-size: 13px !important;
}

/* 아웃트로 프리뷰 크기 슬림화 (모바일/데스크톱 화면 균형 및 과도한 크기 방지) */
.inshot-editor-app .outro-content-box {
  width: 78% !important;
  max-width: 320px !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
}

.inshot-editor-app .outro-logo-wrap img {
  height: 38px !important;
  max-width: 140px !important;
  margin-bottom: 6px !important;
}

.inshot-editor-app .outro-winner-badge {
  font-size: 11px !important;
  padding: 4px 14px !important;
  margin-bottom: 8px !important;
  letter-spacing: 1px !important;
}

.inshot-editor-app .outro-winner-title {
  margin-bottom: 6px !important;
}

.inshot-editor-app .outro-winner-text {
  font-size: 24px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.5px !important;
}

.inshot-editor-app .outro-neon-underline {
  height: 2.5px !important;
  max-width: 180px !important;
  margin-top: 2px !important;
}

.inshot-editor-app .outro-score-wrap {
  gap: 6px !important;
}

.inshot-editor-app .outro-score-label {
  font-size: 9px !important;
  letter-spacing: 1px !important;
}

.inshot-editor-app .outro-score-text {
  font-size: 15px !important;
  letter-spacing: 1px !important;
}

.inshot-editor-app .outro-stats-box {
  width: 86% !important;
  max-width: 400px !important;
}

/* 6. Settings Modal Tabs & Logo Uploader */
.modal-tab-header {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--inshot-border);
  padding-bottom: 8px;
}

.btn-modal-tab {
  flex: 1;
  background: #25282d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #aaa;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-modal-tab.active {
  background: var(--inshot-coral);
  color: #ffffff;
  border-color: var(--inshot-coral);
}

.logo-uploader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25282d;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
}

.logo-thumb-preview {
  height: 28px;
  max-width: 65px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px;
}

.btn-sub-opt {
  background: #33363d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sub-opt:hover {
  background: #444852;
}

.btn-sub-opt.active {
  background: #00c853;
  border-color: #69f0ae;
}

.btn-logo-pos.active {
  background: rgba(255, 214, 0, 0.18) !important;
  color: #ffd600 !important;
  border-color: #ffd600 !important;
  font-weight: 800 !important;
}

.btn-logo-size-preset.active {
  background: rgba(56, 189, 248, 0.22) !important;
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  font-weight: 800 !important;
}

.btn-logo-op-preset.active {
  background: rgba(0, 230, 118, 0.22) !important;
  color: #00e676 !important;
  border-color: #00e676 !important;
  font-weight: 800 !important;
}

/* Scoreboard Size 5-Step Buttons */
.btn-sb-size-step {
  background: #252830;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 6px 3px;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}

.btn-sb-size-step:hover {
  background: #333842;
  border-color: rgba(255, 214, 0, 0.4);
  color: #fff;
}

.btn-sb-size-step.active {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.22), rgba(255, 170, 0, 0.32)) !important;
  border-color: #ffd600 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.35);
  font-weight: 800;
}

.theme-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.btn-theme-card {
  background: #25282d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ddd;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-theme-card:hover {
  border-color: #ffd600;
}

.btn-theme-card.active {
  border-color: #ffd600;
  background: rgba(255, 214, 0, 0.12);
  color: #ffd600;
  font-weight: 900;
}

/* ========================================================
       7. Tennis Player Edit Modal
       ======================================================== */
.player-edit-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.batch-score-modal-card {
  width: min(440px, 95vw);
  max-width: 440px;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 14px 14px;
  margin: auto;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .batch-score-modal-card {
    width: 95vw;
    max-width: 430px;
    padding: 13px 11px;
  }
}

/* 점수 수정 모달용 게임 스텝 및 포인트 원터치 버튼 */
.batch-game-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-batch-step {
  width: 32px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.1s ease;
}

.btn-batch-step:active {
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.28);
}

.btn-quick-g {
  flex: 1 1 0;
  min-width: 0;
  height: 22px;
  padding: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-quick-g:hover,
.btn-quick-g:active {
  background: rgba(0, 229, 255, 0.35);
  border-color: #00e5ff;
  color: #fff;
  transform: scale(0.95);
}

.batch-pt-btn {
  transition: all 0.12s ease;
  user-select: none;
  touch-action: manipulation;
}

.batch-pt-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4) !important;
}

.batch-exact-team-b .batch-pt-btn.active {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  border-color: #fb7185 !important;
  box-shadow: 0 0 8px rgba(251, 113, 133, 0.4) !important;
}

/* ========================================================
       [모바일 가로모드 및 가상 회전] 점수 수정 모달 화면 잘림 방지 & 레이아웃 최적화
       - 화면 높이가 낮은 가로 상태(320~420px)에서 모달이 화면 밖으로 넘치지 않도록 방지
       - pseudo-rotate 상태에서 vh/vw 뒤바뀜 대응 (max-height: 94vw)
       - 가로 2열 배치 및 불필요한 장문 안내 숨김으로 스크롤 없이 한눈에 조작
       ======================================================== */
body.mobile-landscape-mode .player-edit-modal-backdrop,
body.ml-pseudo-rotate .player-edit-modal-backdrop {
  padding: 6px 12px !important;
  align-items: center !important;
  justify-content: center !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
}

body.ml-pseudo-rotate .player-edit-modal-backdrop {
  width: 100vh !important;
  height: 100vw !important;
  max-width: 100vh !important;
  max-height: 100vw !important;
}

body.mobile-landscape-mode .batch-score-modal-card,
body.mobile-landscape-mode .player-edit-card {
  width: min(580px, 94vw) !important;
  max-width: 580px !important;
  max-height: 94vh !important;
  padding: 8px 12px !important;
  gap: 5px !important;
  margin: auto !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
}

body.ml-pseudo-rotate .batch-score-modal-card,
body.ml-pseudo-rotate .player-edit-card {
  width: min(580px, 92vh) !important;
  max-width: min(580px, 92vh) !important;
  max-height: 92vw !important;
  padding: 8px 12px !important;
  gap: 5px !important;
  margin: auto !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
}

body.mobile-landscape-mode #batch-scope-info,
body.ml-pseudo-rotate #batch-scope-info {
  padding: 3px 8px !important;
  font-size: 10px !important;
  margin-bottom: 3px !important;
  line-height: 1.3 !important;
}

body.mobile-landscape-mode #batch-pane-exact>div:first-child,
body.ml-pseudo-rotate #batch-pane-exact>div:first-child {
  display: none !important;
}

body.mobile-landscape-mode #batch-exact-server-grid,
body.ml-pseudo-rotate #batch-exact-server-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
  gap: 4px !important;
}

body.mobile-landscape-mode .direct-server-btn,
body.ml-pseudo-rotate .direct-server-btn {
  min-height: 32px !important;
  padding: 3px 6px !important;
}

body.mobile-landscape-mode .btn-save-pill,
body.ml-pseudo-rotate .btn-save-pill {
  height: 36px !important;
  font-size: 11.5px !important;
}

.player-edit-card {
  background: #1c1c1e;
  border: 1px solid var(--inshot-border);
  border-radius: 16px;
  width: 100%;
  max-width: min(440px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
}

.form-row-type {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.modal-label {
  font-size: 11px;
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill-group {
  display: flex;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.btn-pill-opt {
  flex: 1 1 0%;
  min-width: 0;
  background: var(--inshot-card);
  border: 1px solid var(--inshot-border);
  color: #aaa;
  padding: 7px 6px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.btn-pill-opt:hover,
.btn-pill-opt.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--inshot-yellow);
  color: #fff;
}

.team-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--inshot-border);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.team-section-title {
  font-size: 12px;
  font-weight: 900;
}

.name-inputs-row {
  display: flex;
  gap: 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.inshot-text-input {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  background: #2c2c2e;
  border: 1px solid var(--inshot-border);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 8px;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.inshot-text-input:focus {
  border-color: var(--inshot-yellow);
}

/* 복식 서브 순서 드롭다운 & 입력 필드 래퍼 */
.player-input-wrap {
  flex: 1 1 0%;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.inshot-select-serve-order {
  flex-shrink: 0;
  width: auto;
  min-width: 68px;
  height: 35px;
  background: #1e2029;
  border: 1.5px solid rgba(255, 214, 0, 0.6);
  color: #ffd600;
  font-size: 11px;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.inshot-select-serve-order:focus {
  border-color: #ffd600;
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.6);
}

.inshot-select-serve-order option {
  background: #18191f;
  color: #ffffff;
  font-weight: 700;
}

/* 단식 전용 이름 옆 첫 서브 터치 선택 버튼 */
.btn-single-server {
  flex-shrink: 0;
  width: auto;
  min-width: 78px;
  height: 35px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn-single-server.active {
  border-color: #ffd600;
  background: rgba(255, 214, 0, 0.2);
  color: #ffd600;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.35);
}

/* 전광판 복식 선수명 컬럼 정렬 & 서브 네온 언더라인 (정확히 이름 길이와 1:1 일치) */
.ws-doubles-box {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  height: 100%;
}

.ws-p-col {
  display: inline-block;
  white-space: nowrap;
}

.ws-p1-col {
  text-align: left;
}

.ws-doubles-slash {
  display: inline-block;
  width: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}

.ws-p2-col {
  text-align: left;
}

.ws-p-name-span {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  line-height: 1.2;
}

.ws-p-name-span.is-serving {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 214, 0, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.95);
}

.ws-p-name-span.is-serving::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2.5px;
  height: 2.5px;
  background: #ffd600;
  border-radius: 1.5px;
  box-shadow: 0 0 6px #ffd600, 0 0 12px rgba(255, 214, 0, 0.85);
  animation: wsNeonUnderlinePulse 1.8s infinite ease-in-out;
}

@keyframes wsNeonUnderlinePulse {

  0%,
  100% {
    box-shadow: 0 0 5px #ffd600, 0 0 10px rgba(255, 214, 0, 0.65);
    background: #ffd600;
  }

  50% {
    box-shadow: 0 0 9px #ffe600, 0 0 16px rgba(255, 230, 0, 0.95), 0 0 3px #ffffff;
    background: #fff066;
  }
}

.btn-edit-names-badge {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-edit-names-badge:hover {
  background: var(--inshot-coral);
}

/* ========================================================
       4. InShot Multi-Track Zoomable Timeline (Wrapper & Pinned Needle)
       ======================================================== */
.timeline-wrapper {
  height: var(--timeline-height, 98px);
  position: relative;
  background: #0d0d0f;
  border-top: 1px solid var(--inshot-border);
  border-bottom: none;
  flex-shrink: 0;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  z-index: 60;
  transition: height 0.15s ease;
  contain: layout style paint;
}

.timeline-container {
  height: 100%;
  position: relative;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: pointer;
  touch-action: pan-x pinch-zoom;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  will-change: scroll-position;
}

.timeline-container::-webkit-scrollbar {
  display: none;
}

/* InShot Signature Center Pure White Playhead Needle (Pinned to Viewport Center!) */
.playhead-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 90;
}

/* Live Floating Time Code Badge at the needle head */
.needle-badge {
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 1px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* 세로모드: 바늘 배지에는 현재시간과 현재 배율 표시 */
.needle-badge .needle-time-sep,
.needle-badge #needle-time-total {
  display: none;
}

.needle-badge .needle-zoom-scale {
  display: inline;
  color: #ffd600;
  font-weight: 900;
  margin-left: 2px;
  transition: transform 0.15s ease, color 0.15s ease;
}

/* 가로모드: 상단 시간바 제거에 대응하여 바늘 배지에 [현재시간 / 전체시간 · 🔍배율] 동시 표시 */
body.mobile-landscape-mode .needle-badge {
  font-size: 10px !important;
  padding: 1.5px 7px !important;
  background: rgba(10, 16, 26, 0.92) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
}

body.mobile-landscape-mode .needle-badge .needle-zoom-scale {
  display: inline !important;
  color: #ffd600 !important;
  font-weight: 900 !important;
  margin-left: 3px !important;
}

body.mobile-landscape-mode .needle-badge #needle-time-curr {
  color: #38bdf8 !important;
  font-weight: 900 !important;
}

body.mobile-landscape-mode .needle-badge .needle-time-sep {
  display: inline !important;
  color: rgba(255, 255, 255, 0.5) !important;
  margin: 0 1px !important;
}

body.mobile-landscape-mode .needle-badge #needle-time-total {
  display: inline !important;
  color: #cbd5e1 !important;
  font-weight: 700 !important;
}

/* InShot Downward Triangle Needle Pin */
.needle-pin {
  width: 12px;
  height: 7px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  margin-top: 1px;
}

/* Crisp White Vertical Needle Line running through all tracks */
.needle-line {
  width: 2px;
  flex: 1;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 2px rgba(255, 255, 255, 0.95);
}

/* Floating Timeline Zoom Controls */
.timeline-zoom-bar {
  display: none !important;
  /* 제거됨: 두 손가락 핀치 제스처로 줌 조절 */

  position: absolute;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  right: 12px;
  background: rgba(28, 28, 30, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--inshot-border);
  border-radius: 14px;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 85;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Floating Timeline Add Media Button */
.btn-timeline-add-media {
  position: absolute;
  top: 8px;
  left: 10px;
  right: auto;
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 9px;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.95), rgba(245, 158, 11, 0.95));
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-timeline-add-media:active {
  transform: scale(0.94);
  filter: brightness(1.15);
}

.btn-zoom-step {
  background: none;
  border: none;
  color: #ccc;
  font-size: 14px;
  font-weight: 900;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.btn-zoom-step:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.zoom-level-text {
  font-size: 10px;
  font-weight: 800;
  color: #aaa;
  cursor: pointer;
  min-width: 28px;
  text-align: center;
}

.zoom-level-text:hover {
  color: var(--inshot-coral);
}

/* Floating Zoom Toast */
.timeline-zoom-toast {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid var(--inshot-yellow);
  color: var(--inshot-yellow);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 95;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.timeline-zoom-toast.show {
  opacity: 1;
}

/* Ruler Track (Compact & Slim) */
.ruler-track {
  height: 15px;
  position: relative;
  margin-bottom: 2px;
  pointer-events: none;
}

.ruler-tick {
  position: absolute;
  top: 7px;
  width: 1px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
}

.ruler-tick.major {
  top: 4px;
  height: 9px;
  background: rgba(255, 255, 255, 0.65);
}

.ruler-label {
  position: absolute;
  top: -1px;
  transform: translateX(-50%);
  font-size: 8.5px;
  font-family: monospace;
  color: #888;
  font-weight: 700;
}

.tracks-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 0;
  width: max-content;
  min-width: 100%;
  box-sizing: content-box;
}

/* Subtitle Track (InShot Signature Orange/Coral Chip) */
.track-subtitle {
  min-height: 28px;
  position: relative;
  margin-bottom: 4px;
  touch-action: none;
}

.subtitle-bar {
  position: absolute;
  height: 26px;
  top: 1px;
  background: linear-gradient(135deg, #ff7a18, #ff5a43);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  user-select: none;
  touch-action: none;
  white-space: nowrap;
  overflow: visible;
  z-index: 5;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.subtitle-bar.selected,
.subtitle-bar:hover {
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 1.5px #ffd600, 0 3px 12px rgba(255, 90, 67, 0.6) !important;
  z-index: 10;
}

.subtitle-bar.dragging-bar,
.subtitle-bar:active {
  cursor: grabbing;
  box-shadow: 0 0 0 2px #ccff00, 0 4px 16px rgba(0, 0, 0, 0.8) !important;
  z-index: 20;
}

.subtitle-label {
  flex: 1;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

/* InShot Signature Wide Handle Tabs with Grip Bars */
.sub-handle {
  width: 18px;
  min-width: 18px;
  height: 100%;
  background: #ffffff;
  cursor: ew-resize;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  position: relative;
  transition: transform 0.1s ease, background 0.12s ease;
  z-index: 15;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.sub-handle::after {
  content: "";
  width: 2.5px;
  height: 12px;
  background: #ff5a43;
  border-radius: 2px;
  display: block;
}

.sub-handle:hover,
.sub-handle.active,
.sub-handle:active {
  background: #ffd600;
  transform: scaleY(1.15);
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.9);
}

.sub-handle:hover::after,
.sub-handle.active::after,
.sub-handle:active::after {
  background: #111;
}

.sub-handle-l {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  margin-left: -1px;
}

.sub-handle-r {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  margin-right: -1px;
}

/* Video Track (Compact & Flush) */
.track-video {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0;
  /* ZERO GAP - flush seam like InShot */
  position: relative;
}

.video-clip {
  height: 46px;
  background: #232328;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1.5px solid rgba(0, 0, 0, 0.85);
  /* Distinct vertical split seam */
  cursor: pointer;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  color: #ccc;
  transition: background 0.15s, border 0.15s;
  flex-shrink: 0;
  box-sizing: border-box;
  touch-action: pan-x pinch-zoom;
  user-select: none;
}

.video-clip:hover {
  background: #2a2a30;
  color: #fff;
}

.video-clip.selected {
  border: 2.5px solid var(--inshot-yellow) !important;
  background: #2f2d3a !important;
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 214, 0, 0.7);
  z-index: 5;
}

/* Game color accents */
.video-clip[data-game="1"] {
  border-left: 3px solid #0091ff;
}

.video-clip[data-game="2"] {
  border-left: 3px solid #fb2c53;
}

.video-clip[data-game="3"] {
  border-left: 3px solid #00e676;
}

.video-clip[data-game="4"] {
  border-left: 3px solid #aa00ff;
}

.video-clip[data-game="5"] {
  border-left: 3px solid #ffaa00;
}

.video-clip[data-game="6"] {
  border-left: 3px solid #ffd600;
}

.video-clip.is-hl {
  background: #2f2528;
}

/* Interactive InShot Yellow Trim Handles (Desktop Mouse & Mobile Touch Supported) */
.trim-handle {
  position: absolute;
  top: -2.5px;
  bottom: -2.5px;
  width: 14px;
  background: var(--inshot-yellow);
  cursor: col-resize;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 25;
  touch-action: none;
}

/* Hitbox expansion for effortless mobile finger tapping */
.trim-handle::before {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -12px;
  right: -12px;
}

.trim-handle::after {
  content: '';
  width: 2px;
  height: 18px;
  background: #111;
  border-radius: 1px;
}

.video-clip.selected .trim-handle {
  display: flex;
}

.trim-handle-left {
  left: -2.5px;
  border-radius: 5px 0 0 5px;
}

.trim-handle-right {
  right: -2.5px;
  border-radius: 0 5px 5px 0;
}

/* Transition Split Mark between Clips - Hidden so it doesn't displace the time axis or look like a pause button */
.transition-split-box {
  display: none !important;
}

/* ========================================================
       Mode Separation Rules (일반 인샷 모드 vs 테니스 전용 컷 모드)
       * [핵심] 인샷 표준 하단 도구(분할, 삭제, 텍스트, 캔버스 등)는 두 모드 모두 100% 상시 유지!
       ======================================================== */
body.mode-general #scoreboard-overlay {
  display: none !important;
}

body.mode-general .tennis-quick-bar {
  display: none !important;
}

body.mode-general .tennis-submode-container {
  display: none !important;
}

body.mode-general .tool-tennis-only,
body.mode-general .tool-rally-start,
body.mode-general .tool-rally-end,
body.mode-general .tool-autocut,
body.mode-general [data-tool-id="rally-start"],
body.mode-general [data-tool-id="rally-end"],
body.mode-general [data-tool-id="autocut"],
body.mode-general .btn-action-autocut-toggle,
body.mode-general .btn-action-rally-swap,
body.mode-general #btn-toggle-autocut-mode {
  display: none !important;
}

body.mode-general .inshot-bottom-tools {
  display: flex !important;
}

body.mode-general #btn-mode-general {
  background: #333338;
  color: #fff;
}

body.mode-general #btn-mode-tennis {
  background: none;
  color: #999;
}

body.mode-tennis #scoreboard-overlay {
  display: flex;
}

body.mode-tennis #scoreboard-overlay.is-hidden-for-overlay {
  display: none !important;
}

body.mode-tennis .tennis-quick-bar {
  display: flex !important;
}

body.mode-tennis .tennis-submode-container {
  display: flex !important;
}

body.mode-tennis .tool-tennis-only:not(.is-tool-hidden) {
  display: flex !important;
}

.tool-item.is-tool-hidden {
  display: none !important;
}

body.mode-tennis .tool-tennis-hide,
body.mode-tennis .tool-general-only,
body.mode-tennis #tool-restore-raw,
body.mode-tennis [data-tool-id="restore-raw"],
body.mode-tennis [data-tool-id="filter"],
body.mode-tennis [data-tool-id="pip"],
body.mode-tennis [data-tool-id="bg"] {
  display: none !important;
}

body.mode-tennis .btn-action-autocut-toggle {
  display: inline-flex !important;
}

body.mode-tennis .btn-action-rally-swap {
  display: inline-flex !important;
}

body.mode-tennis .inshot-bottom-tools {
  display: flex !important;
}

body.mode-tennis #btn-mode-general {
  background: none;
  color: #999;
}

body.mode-tennis #btn-mode-tennis {
  background: var(--inshot-tennis);
  color: #000;
  font-weight: 900;
}

/* [핵심 1번 요청 반영] 테니스 컷 모드에서는 좌우 스크롤 시 프레임(클립) 길이가 멋대로 조절되지 않도록 트림 핸들 완전 비활성화 */
body.mode-tennis .video-clip .trim-handle,
body.mode-tennis .video-clip.selected .trim-handle {
  display: none !important;
  pointer-events: none !important;
}

/* [핵심 요청 반영] 인트로(머릿말) / 아웃트로(맺음말) 타임라인 패딩 영역 내 원터치 미리보기 카드 */
.timeline-bookend-card {
  position: absolute;
  bottom: 6px;
  height: 46px;
  width: 114px;
  border-radius: 9px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  z-index: 25;
  pointer-events: auto !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

body.mode-tennis .timeline-bookend-card {
  display: flex;
}

.timeline-bookend-intro {
  background: linear-gradient(135deg, rgba(0, 77, 37, 0.95), rgba(0, 38, 18, 0.98));
  border: 1.5px solid #d4af37;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.timeline-bookend-outro {
  background: linear-gradient(135deg, rgba(81, 43, 88, 0.95), rgba(38, 16, 48, 0.98));
  border: 1.5px solid #ffd700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.timeline-bookend-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 214, 0, 0.5);
}

.timeline-bookend-card:active {
  transform: scale(0.96);
}

.timeline-bookend-card.is-disabled {
  opacity: 0.48;
  background: rgba(28, 28, 34, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.timeline-bookend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 7px;
  box-sizing: border-box;
}

.timeline-bookend-tag {
  font-size: 9.5px;
  font-weight: 900;
  color: #ffe600;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.timeline-bookend-card.is-disabled .timeline-bookend-tag {
  color: #94a3b8;
}

.timeline-bookend-toggle {
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(217, 255, 0, 0.22);
  color: #d9ff00;
  border: 1px solid rgba(217, 255, 0, 0.5);
  cursor: pointer;
  line-height: 1.2;
}

.timeline-bookend-card.is-disabled .timeline-bookend-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.2);
}

.timeline-bookend-title {
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.timeline-bookend-sub {
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

/* 커넥터 화살표 (타임라인 바깥에 위치함을 직관적으로 표시) */
.timeline-bookend-intro::after {
  content: '▸';
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: #d4af37;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.timeline-bookend-outro::before {
  content: '◂';
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffd700;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

/* ========================================================
       5. InShot Signature Bottom Tool Carousel (18 Tools + Tennis)
       ======================================================== */

/* ========================================================
       실시간 선수별 5대 핵심 실전 지표 테이블 (컴팩트 슬림 브로드캐스트)
       - 영상 뷰포트 바로 아래, 되돌리기/재생 액션바 바로 위 배치
       - 100% 실시간 선수별 연동 (첫서브/서브게임킵/리턴/더블폴트/자체범실)
       - 완전 자동 모드(stats-mode-auto)에서는 자동 숨김 처리
       ======================================================== */
/* ========================================================
       실시간 3라인 경기 정보 & 5대 핵심 지표 바 (방송 중계 전광판)
       - Line 1: 최신 변동 이벤트 / 행위 배지 (자체범실, 더블폴트, 득점 등)
       - Line 2: 실시간 스코어보드 (게임 스코어, 포인트/타이브레이크, 서브권)
       - Line 3: 5대 핵심 데이터 상세 (횟수, 퍼센티지 %, 실시간 비율 그래프)
       ======================================================== */
.tennis-live-metrics-bar {
  display: none;
  width: 100%;
  min-height: 84px;
  height: auto;
  max-height: none;
  background: linear-gradient(135deg, #0a111e 0%, #111e33 50%, #0d1624 100%);
  border-top: 1.5px solid rgba(0, 229, 255, 0.35);
  border-bottom: 2px solid rgba(0, 229, 255, 0.5);
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 76;
  user-select: none;
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  font-size: 13px;
  color: #e2e8f0;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
  transition: background 0.25s ease, border-color 0.25s ease;
}

body.mode-tennis:not(.stats-mode-auto) .tennis-live-metrics-bar {
  display: flex !important;
}

body.mode-general .tennis-live-metrics-bar,
body.stats-mode-auto .tennis-live-metrics-bar,
body.stats-mode-auto #precision-serve-chip-row {
  display: none !important;
}

/* Line 1: 최신 변동 이벤트 & 배지 행 */
.tlm-line-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 24px;
  min-height: 24px;
  overflow: hidden;
}

.tlm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: -0.2px;
  flex-shrink: 0;
  line-height: 1.2;
}

.tlm-badge-pulse {
  animation: tlmBadgePulseAnim 1.6s infinite ease-in-out;
}

@keyframes tlmBadgePulseAnim {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.tlm-badge-ue {
  background: rgba(239, 68, 68, 0.25);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
}

.tlm-badge-df {
  background: rgba(245, 158, 11, 0.25);
  border: 1.5px solid #f59e0b;
  color: #fcd34d;
}

.tlm-badge-ret {
  background: rgba(168, 85, 247, 0.25);
  border: 1.5px solid #a855f7;
  color: #d8b4fe;
}

.tlm-badge-point {
  background: rgba(0, 229, 255, 0.22);
  border: 1.5px solid #00e5ff;
  color: #67e8f9;
}

.tlm-badge-undo {
  background: rgba(255, 214, 0, 0.22);
  border: 1.5px solid #ffd600;
  color: #fef08a;
}

.tlm-badge-live {
  background: rgba(0, 229, 255, 0.18);
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}

.tlm-badge-default {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #cbd5e1;
}

.tlm-event-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.tlm-ticker-link {
  font-size: 10.5px;
  font-weight: 900;
  color: #ffd600;
  background: rgba(255, 214, 0, 0.14);
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 214, 0, 0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Line 2: 해당 선수의 누적 실수 및 핵심 지표 행 */
.tlm-line-2 {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  min-height: 25px;
  overflow: hidden;
}

.tlm-player-stat-text {
  font-size: 12px;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  letter-spacing: -0.2px;
}

.tlm-player-stat-text b {
  color: #ffffff;
  font-weight: 900;
}

/* Line 3: 5대 핵심 데이터 상세 & 실시간 비율 바 */
.tlm-line-3 {
  display: flex;
  align-items: center;
  height: 24px;
  min-height: 24px;
  overflow: hidden;
}

.tlm-row-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow: hidden;
}

.tlm-stats-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 1.5px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}

.tlm-stats-badge.main {
  background: rgba(0, 229, 255, 0.16);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.tlm-stats-badge.ue {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

.tlm-stats-badge.df {
  background: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
  border: 1px solid #f59e0b;
}

.tlm-stats-badge.ret {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  border: 1px solid #a855f7;
}

.tlm-stats-desc {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.tlm-ratio-bar-wrap {
  width: 52px;
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tlm-ratio-bar-a {
  height: 100%;
  background: #00e5ff;
  transition: width 0.3s ease;
}

.tlm-ratio-bar-b {
  height: 100%;
  background: #f43f5e;
  transition: width 0.3s ease;
}

/* 통계 모드 퀵 토글 버튼 스타일 */
.btn-action-stats-mode {
  height: 28px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-action-stats-mode.mode-is-auto {
  background: rgba(255, 214, 0, 0.16);
  border-color: rgba(255, 214, 0, 0.5);
  color: #ffd600;
}

.bottom-tools-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--inshot-bg);
  border-top: 1px solid var(--inshot-border);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0;
  flex-shrink: 0;
  z-index: 80;
  box-sizing: border-box;
}

nav.inshot-bottom-tools {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: var(--tools-bar-height, 56px);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
  border: none;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: height 0.15s ease;
}

nav.inshot-bottom-tools::-webkit-scrollbar {
  display: none;
}

.btn-tools-scroll-nav,
.btn-tools-layout-toggle {
  display: none;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  min-width: 52px;
  height: 48px;
  padding: 3px 6px;
  border-radius: 8px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  box-sizing: border-box;
}

.tool-item:active {
  transform: scale(0.92);
  filter: brightness(1.2);
}

@media (hover: hover) and (pointer: fine) {
  .tool-item:hover {
    color: #fff;
    transform: translateY(-1px);
  }
}

.tool-item.active {
  color: #fff;
  transform: translateY(-1px);
}

.tool-item.active .tool-icon {
  color: var(--inshot-coral);
}

.tool-icon {
  font-size: 20px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tool-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  text-align: center;
  line-height: 1.15;
}

.tool-item.special-tennis {
  background: rgba(204, 255, 0, 0.08);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(204, 255, 0, 0.35);
  height: 48px;
  box-sizing: border-box;
}

.tool-item.special-tennis .tool-name {
  color: var(--inshot-tennis);
  font-weight: 900;
  white-space: nowrap;
}

/* ========================================================
       6. Sub-Drawers
       ======================================================== */
.sub-drawer {
  position: absolute;
  bottom: calc(var(--timeline-height, 98px) + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: #18181b;
  border-top: 1px solid var(--inshot-border);
  padding: 14px 18px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 95;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.85);
  animation: slideUp 0.18s ease-out forwards;
}

.sub-drawer.active {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 13px;
  font-weight: 800;
  color: #ddd;
}

.btn-close-x {
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.btn-close-x:hover {
  color: #fff;
}

/* Text Drawer Tabs */
.text-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--inshot-border);
  padding-bottom: 8px;
}

.text-tab-btn {
  background: none;
  border: none;
  color: #777;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
}

.text-tab-btn.active {
  color: #fff;
  border-bottom: 2px solid var(--inshot-coral);
}

.color-dots-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s;
}

.dot:hover,
.dot.active {
  transform: scale(1.15);
  border-color: #fff;
}

.font-scroll-box {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0;
}

.font-card {
  background: var(--inshot-card);
  border: 1px solid var(--inshot-border);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.font-card:hover,
.font-card.active {
  border-color: var(--inshot-coral);
  background: rgba(251, 44, 83, 0.15);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #aaa;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--inshot-coral);
}

/* Canvas Ratios */
.ratios-grid {
  display: flex;
  gap: 10px;
}

.chip-ratio {
  flex: 1;
  background: var(--inshot-card);
  border: 1px solid var(--inshot-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s;
}

.chip-ratio:hover,
.chip-ratio.active {
  border-color: var(--inshot-coral);
  background: rgba(251, 44, 83, 0.15);
  color: #fff;
}

/* Tennis Cut Panel */
.tennis-cut-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-stats-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--inshot-border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-header {
  font-size: 12px;
  font-weight: 900;
  color: var(--inshot-tennis);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 10px;
  color: #888;
  font-weight: 700;
}

.stat-val {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.tennis-cut-btn-big {
  background: linear-gradient(135deg, #1f422e, #13271c);
  border: 1.5px solid var(--inshot-tennis);
  color: var(--inshot-tennis);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(204, 255, 0, 0.2);
  transition: all 0.15s;
}

.tennis-cut-btn-big:hover {
  background: linear-gradient(135deg, #27543a, #1a3526);
  transform: translateY(-1px);
}

.tennis-settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.t-setting-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--inshot-border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.t-setting-box label {
  font-size: 10px;
  color: #888;
  font-weight: 700;
}

.t-setting-box select,
.t-setting-box button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--inshot-border);
  color: #fff;
  padding: 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* AI Loading Toast */
.ai-cut-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--inshot-tennis);
  padding: 24px 34px;
  border-radius: 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 200;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3.5px solid rgba(204, 255, 0, 0.2);
  border-top-color: var(--inshot-tennis);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
       InShot Signature Save & Export Modal System (Pure InShot Style)
       ========================================================= */
.inshot-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 14, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
}

/* Save Settings Dialog */
.inshot-save-dialog {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95);
  animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.inshot-save-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inshot-save-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inshot-save-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inshot-save-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #e5e5ea;
}

.inshot-save-hint {
  font-size: 11px;
  color: var(--inshot-coral);
  font-weight: 800;
}

.inshot-pills-row {
  display: flex;
  gap: 6px;
  background: #141416;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inshot-opt-pill {
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #8e8e93;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.inshot-opt-pill:hover {
  color: #fff;
}

.inshot-opt-pill.active {
  background: #2c2c2e;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.inshot-save-summary-card {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  color: #8e8e93;
}

.summary-line .val {
  color: #fff;
  font-weight: 600;
}

.summary-line.highlight {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: 2px;
}

.summary-line .val-bold {
  color: #ffd600;
  font-weight: 900;
  font-size: 13px;
}

.btn-inshot-export-action {
  background: linear-gradient(135deg, var(--inshot-coral), #e02045);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  padding: 13px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 20px rgba(251, 44, 83, 0.45);
  transition: all 0.15s ease;
}

.btn-inshot-export-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(251, 44, 83, 0.6);
}

.btn-inshot-export-action:active {
  transform: translateY(1px);
}

/* Export Preview Action in Save Dialog */
.btn-inshot-preview-action {
  flex: 1;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: #00e5ff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 12px 10px;
  border-radius: 28px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-inshot-preview-action:hover {
  background: rgba(0, 229, 255, 0.22);
  border-color: #00e5ff;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
  color: #fff;
}

.btn-inshot-preview-action:active {
  transform: scale(0.98);
}

/* Top bar preview button */
.btn-top-preview {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  border-radius: 20px;
  padding: 0 11px;
  height: 32px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-top-preview:hover {
  background: rgba(0, 229, 255, 0.22);
  border-color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  color: #fff;
}

/* =========================================================
       Export Preview Modal Dialog (WYSIWYG 100% Matching Player)
       ========================================================= */
.export-preview-dialog {
  background: #18191d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px 20px;
  width: 100%;
  max-width: 900px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95);
  animation: modalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-sizing: border-box;
}

.export-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.export-preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.export-preview-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
}

.export-preview-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}

.preview-badge.res-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #ffd600;
  border: 1px solid rgba(255, 214, 0, 0.3);
}

.preview-badge.wysiwyg-badge {
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Video Preview Stage */
.export-preview-stage-wrap {
  position: relative;
  width: 100%;
  max-height: 52vh;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  margin: 0 auto;
}

.export-preview-stage-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.export-preview-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.export-preview-stage-wrap.is-paused .export-preview-play-overlay {
  opacity: 1;
}

.big-play-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(251, 44, 83, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(251, 44, 83, 0.5);
  padding-left: 4px;
}

.play-hint-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border-radius: 12px;
}

.preview-badge.rally-badge,
.export-preview-live-info {
  background: rgba(204, 255, 0, 0.16);
  color: #ccff00;
  border: 1px solid rgba(204, 255, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 10px;
}

.preview-badge.rally-badge .live-dot,
.export-preview-live-info .live-dot {
  color: rgba(255, 255, 255, 0.7);
}

/* Quick Jump Chips */
.export-preview-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 6px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.export-preview-chips-row::-webkit-scrollbar {
  display: none;
}

.preview-jump-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d1d6;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.preview-jump-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.preview-jump-chip:active {
  transform: scale(0.96);
}

/* Controls Bar */
.export-preview-controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #121316;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px 12px;
}

.btn-prev-ctrl {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-prev-ctrl:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-prev-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--inshot-coral);
  border: none;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(251, 44, 83, 0.4);
}

.btn-prev-step {
  padding: 0 9px;
  height: 32px;
  font-size: 11.5px;
  flex-shrink: 0;
}

.export-preview-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 80px;
}

.export-preview-scrubber {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.export-preview-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.export-preview-scrubber::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.export-preview-time-display {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

.export-preview-time-display .cur-t {
  color: #fff;
  font-weight: 800;
}

.export-preview-time-display .sep {
  margin: 0 2px;
  color: #666;
}

/* Footer */
.export-preview-footer {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.btn-export-prev-close {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #aaa;
  font-size: 13.5px;
  font-weight: 800;
  padding: 12px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-export-prev-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-export-prev-save {
  flex: 2;
  background: linear-gradient(135deg, var(--inshot-coral), #e02045);
  border: none;
  color: #fff;
  font-size: 14.5px;
  font-weight: 900;
  padding: 12px;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(251, 44, 83, 0.45);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-export-prev-save:hover {
  box-shadow: 0 6px 22px rgba(251, 44, 83, 0.6);
  transform: translateY(-1px);
}

/* Exporting / Rendering Screen */
.inshot-export-card {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* InShot Circular Progress Ring */
.export-circle-container {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.inshot-circular-ring {
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.ring-fg {
  fill: none;
  stroke: var(--inshot-coral);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.12s linear;
}

.export-circle-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.export-percent-num {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.export-percent-lbl {
  font-size: 11px;
  color: #8e8e93;
  font-weight: 700;
  margin-top: 2px;
}

.export-status-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.export-status-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.export-status-desc {
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.4;
}

.export-status-warning {
  font-size: 11px;
  color: #ffd600;
  background: rgba(255, 214, 0, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  margin-top: 4px;
}

.btn-inshot-cancel-flat {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #8e8e93;
  padding: 9px 24px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-inshot-cancel-flat:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Saved Complete State */
.inshot-complete-badge-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.inshot-complete-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e676, #00b0ff);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 18px rgba(0, 230, 118, 0.4);
  margin-bottom: 2px;
}

.inshot-complete-title {
  font-size: 19px;
  font-weight: 900;
  color: #fff;
}

.inshot-complete-sub {
  font-size: 12px;
  color: #8e8e93;
}

.inshot-video-preview-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  max-height: 220px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.inshot-video-preview-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.btn-primary-youtube-upload {
  background: linear-gradient(135deg, #ff1a1a, #cc0000);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  padding: 13px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 22px rgba(255, 0, 0, 0.45);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary-youtube-upload:hover {
  box-shadow: 0 8px 28px rgba(255, 0, 0, 0.65);
  transform: translateY(-1px);
}

.btn-primary-youtube-upload:active {
  transform: scale(0.98);
}

.btn-inshot-redownload-link {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: underline;
  transition: color 0.15s;
}

.btn-inshot-redownload-link:hover {
  color: #fff;
}

.inshot-share-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
}

.inshot-share-title {
  font-size: 11px;
  font-weight: 800;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inshot-share-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
}

.btn-share-icon {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #a0a0a8;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.16s ease;
  padding: 0;
  flex: 1;
  max-width: 58px;
}

.btn-share-icon:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-share-icon:active {
  transform: scale(0.92);
}

.share-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: all 0.15s ease;
}

.share-circle svg {
  width: 22px;
  height: 22px;
  display: block;
}

.btn-inshot-finish-home,
.btn-inshot-finish-edit {
  transition: all 0.16s ease;
}

.btn-inshot-finish-home:hover,
.btn-inshot-finish-edit:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-inshot-finish-home:active,
.btn-inshot-finish-edit:active {
  transform: scale(0.97);
}

.btn-inshot-finish-flat {
  background: transparent;
  border: none;
  color: #8e8e93;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s;
}

.btn-inshot-finish-flat:hover {
  color: #fff;
}

/* Notification Banner */
.toast-banner {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.95);
  border: 1px solid var(--inshot-coral);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  z-index: 1000005;
  display: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

/* ========================================================
       InShot Home Screen Wizard & View Manager CSS
       ======================================================== */
body.view-home #inshot-home-screen {
  display: flex;
}

body.view-home #inshot-editor-app {
  display: none !important;
}

body.view-editor #inshot-home-screen {
  display: none !important;
}

body.view-editor #inshot-editor-app {
  display: flex;
}

.inshot-editor-app {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
}

.inshot-editor-app::-webkit-scrollbar {
  display: none;
}

/* Desktop Web Studio Layout (스마트폰이 아닌 PC/웹 브라우저 작업 시 와이드 화면 최적화) */
@media (min-width: 641px) {
  body {
    background: #090a0f;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .inshot-home-screen {
    max-width: 720px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 900px;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1.5px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: auto;
  }

  .inshot-editor-app {
    max-width: 1680px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: auto;
  }

  header.inshot-top-bar {
    height: 52px;
    padding: 0 18px;
    gap: 12px;
  }

  .top-app-title {
    font-size: 15px;
    font-weight: 900;
    display: inline-block !important;
  }

  .viewport-box {
    background: #090c13;
    min-height: 0;
    min-width: 0;
  }

  .canvas-wrapper {
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.98), 0 0 0 1px rgba(255, 255, 255, 0.18);
  }

  /* 데스크톱 테니스 점수판 및 툴바 정렬 */
  .tennis-score-point-bar {
    max-width: 900px;
    margin: 0 auto;
    justify-content: center;
  }

  /* 웹(PC)에서는 폴트, 리턴에러 단추를 기존과 같은 크기(전체 너비 1:1 균등 분할)로 완벽 복원 */
  .precision-serve-chip-row {
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 6px 12px !important;
  }

  #precision-server-info-badge {
    display: none !important;
  }

  .precision-smart-toggle-btn {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 6px 12px !important;
    gap: 8px !important;
  }

  .label-active-server-name,
  .label-active-receiver-name {
    display: inline !important;
  }

  .bottom-tools-wrapper {
    padding: 2px 8px;
    background: #111317;
  }

  /* [웹 화면 도구 모음 최적화: 기본 2줄 전체보기] 모든 도구가 한눈에 100% 다 보이도록 자동 배치 */
  body:not(.tools-mode-single) nav.inshot-bottom-tools {
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: center;
    justify-content: flex-start;
    gap: 3px 5px !important;
    padding: 4px 6px !important;
    height: auto !important;
    min-height: 52px;
    max-height: 86px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: none !important;
  }

  body:not(.tools-mode-single) nav.inshot-bottom-tools .tool-item {
    min-width: 44px;
    height: 35px;
    padding: 2px 4px;
    gap: 1px;
    flex-shrink: 0;
  }

  body:not(.tools-mode-single) nav.inshot-bottom-tools .tool-icon {
    font-size: 15px;
    line-height: 1.1;
  }

  body:not(.tools-mode-single) nav.inshot-bottom-tools .tool-name {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.1;
    white-space: nowrap;
  }

  body:not(.tools-mode-single) nav.inshot-bottom-tools .tool-item .kbd-badge {
    display: none !important;
  }

  body:not(.tools-mode-single) .btn-tools-scroll-nav {
    display: none !important;
  }

  /* [웹 화면 도구 모음 1줄 슬라이드 모드] ◀ ▶ 내비게이션 버튼으로 편리하게 슬라이드 */
  body.tools-mode-single nav.inshot-bottom-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    height: var(--tools-bar-height, 52px);
    padding: 0 6px !important;
    gap: 8px !important;
    scroll-behavior: smooth;
    border: none !important;
  }

  body.tools-mode-single .btn-tools-scroll-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 2px;
    font-size: 11px;
    transition: all 0.15s;
    z-index: 85;
  }

  body.tools-mode-single .btn-tools-scroll-nav:hover {
    background: rgba(204, 255, 0, 0.25);
    border-color: #ccff00;
    color: #ccff00;
  }

  .btn-tools-layout-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(204, 255, 0, 0.35);
    color: #ccff00;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 4px 0 6px;
    transition: all 0.15s;
    white-space: nowrap;
    z-index: 85;
  }

  .btn-tools-layout-toggle:hover {
    background: rgba(204, 255, 0, 0.18);
    border-color: #ccff00;
  }

  nav.inshot-bottom-tools::-webkit-scrollbar {
    height: 5px;
    display: block;
  }

  nav.inshot-bottom-tools::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
  }

  nav.inshot-bottom-tools::-webkit-scrollbar-thumb {
    background: rgba(204, 255, 0, 0.4);
    border-radius: 3px;
  }

  nav.inshot-bottom-tools::-webkit-scrollbar-thumb:hover {
    background: rgba(204, 255, 0, 0.8);
  }

  .timeline-container {
    padding: 0 !important;
  }

  /* 키보드 단축키 힌트 배지 */
  .kbd-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #dcdcdc;
    font-size: 9px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    pointer-events: none;
  }

  /* 데스크톱 마우스 호버 효과 */
  .tool-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
  }

  .btn-action-icon:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .btn-score-point:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
  }

  /* [웹 전용] 테니스 정밀 모드 실시간 통계 인포그래픽 사이드 배치 */
  body.mode-tennis .viewport-box.has-side-stats {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    padding: 8px 16px !important;
    box-sizing: border-box !important;
  }


}

/* 단축키 버튼 및 모달 스타일 */
.btn-top-shortcuts {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  height: 32px;
  padding: 0 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-top-shortcuts:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-top-shortcuts:active {
  transform: scale(0.95);
}

.inshot-shortcuts-dialog {
  background: #18191f;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  width: 92%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: shortcutsModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shortcutsModalPop {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1f2029;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcuts-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shortcuts-icon {
  font-size: 26px;
}

.shortcuts-title {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.shortcuts-subtitle {
  font-size: 11.5px;
  color: #9ea3b5;
  margin-top: 2px;
}

.btn-shortcuts-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #bbb;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.btn-shortcuts-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.shortcuts-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 58vh;
}

.shortcuts-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.shortcuts-sec-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ccff00;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 12px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #e2e4ec;
}

.shortcut-row kbd,
.shortcuts-footer kbd {
  background: #2a2b38;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 2px 7px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  min-width: 24px;
  text-align: center;
}

.shortcuts-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #14151a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.shortcuts-tip {
  font-size: 11px;
  color: #8c90a4;
}

.btn-shortcuts-confirm {
  background: #ccff00;
  color: #000;
  border: none;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 16px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s, background 0.15s;
}

.btn-shortcuts-confirm:hover {
  background: #ddff33;
  transform: scale(1.02);
}

.btn-shortcut-key {
  background: #2a2b38;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  color: #00e5ff;
  font-size: 11px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 28px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-shortcut-key:hover {
  background: #383a4c;
  border-color: #00e5ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 229, 255, 0.3);
}

.btn-shortcut-key.is-recording {
  background: rgba(0, 229, 255, 0.25) !important;
  border-color: #00e5ff !important;
  border-bottom-color: #00e5ff !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.8) !important;
  animation: keyRecordPulse 0.9s infinite alternate;
}

@keyframes keyRecordPulse {
  0% {
    transform: scale(1.0);
  }

  100% {
    transform: scale(1.06);
    box-shadow: 0 0 16px #00e5ff;
  }
}

.btn-shortcuts-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #c0c3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-shortcuts-reset:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.kbd-badge {
  display: none;
}

/* Mode Visibility Management */
body.mode-general .tennis-quick-bar,
body.mode-general #scoreboard-overlay {
  display: none !important;
}

body.mode-tennis .tennis-quick-bar {
  display: flex !important;
}

body.mode-tennis #scoreboard-overlay {
  display: flex;
}

/* Mobile Responsive Optimizations (< 640px) */
@media (max-width: 640px) {

  /* 모바일 스코어보드 오른쪽 실시간 지표 티커 컴팩트 스타일 (항상 스코어 오른쪽 고정) */
  .ws-sub-stat-strip {
    height: 22px !important;
    gap: 4px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    left: calc(100% + 4px) !important;
    right: auto !important;
  }

  .ws-sub-stat-badge {
    font-size: 8.5px !important;
    padding: 1.5px 3.5px !important;
  }

  /* 실시간 5대 핵심 지표 바 모바일 3라인 컴팩트 스타일 (3라인 구조 유지, 위아래 폭 슬림화로 타임라인 공간 확보) */
  .tennis-live-metrics-bar {
    padding: 2px 7px !important;
    min-height: 52px !important;
    gap: 1px !important;
    border-top-width: 1px !important;
    border-bottom-width: 1.5px !important;
  }

  .tennis-live-metrics-bar .tlm-line-1 {
    height: 16px !important;
    min-height: 16px !important;
    gap: 5px !important;
  }

  .tennis-live-metrics-bar .tlm-badge {
    padding: 0.5px 5px !important;
    font-size: 9.5px !important;
    line-height: 1.1 !important;
    border-width: 1px !important;
  }

  .tennis-live-metrics-bar .tlm-event-text {
    font-size: 10.5px !important;
    line-height: 1.1 !important;
  }

  .tennis-live-metrics-bar .tlm-ticker-link {
    font-size: 9px !important;
    padding: 0.5px 5px !important;
    line-height: 1.1 !important;
  }

  .tennis-live-metrics-bar .tlm-line-2 {
    height: 16px !important;
    min-height: 16px !important;
    gap: 4px !important;
  }

  .tennis-live-metrics-bar .tlm-player-stat-text {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .tennis-live-metrics-bar .tlm-line-3 {
    height: 16px !important;
    min-height: 16px !important;
  }

  .tennis-live-metrics-bar .tlm-row-stats {
    gap: 4px !important;
  }

  .tennis-live-metrics-bar .tlm-stats-badge {
    font-size: 9px !important;
    padding: 0.5px 4px !important;
    line-height: 1.1 !important;
  }

  .tennis-live-metrics-bar .tlm-stats-desc {
    font-size: 9.5px !important;
    line-height: 1.1 !important;
  }

  .tennis-live-metrics-bar .tlm-ratio-bar-wrap {
    width: 44px !important;
    height: 5px !important;
  }

  .tlm-track {
    gap: 3px !important;
    padding: 1px 2px !important;
  }

  .tlm-cell {
    min-width: 54px !important;
    padding: 2px 2px !important;
    border-radius: 5px !important;
  }

  .tlm-val {
    font-size: 9.5px !important;
  }

  .tlm-label {
    font-size: 9px !important;
  }

  .tlm-pill {
    font-size: 8.5px !important;
    padding: 0.5px 3px !important;
  }

  .tlm-sub {
    display: none !important;
  }

  /* [엄지 터치 최적화] 하단 편집 도구 모음: 화면 최하단 엄지손가락 편안한 도달 & 폭 확장 */
  .bottom-tools-wrapper {
    padding: 4px 6px max(8px, env(safe-area-inset-bottom, 8px)) 6px !important;
    background: #111317 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-bottom: none !important;
  }

  nav.inshot-bottom-tools {
    height: 52px !important;
    gap: 6px !important;
    padding: 0 4px !important;
  }

  .tool-item {
    min-width: 58px !important;
    height: 48px !important;
    padding: 3px 4px !important;
    border-radius: 8px !important;
  }

  .tool-item.tool-split {
    min-width: 64px !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .tool-item.tool-delete {
    min-width: 62px !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .tool-item.tool-rally-start {
    min-width: 80px !important;
    background: rgba(204, 255, 0, 0.14) !important;
    border: 1px solid rgba(204, 255, 0, 0.45) !important;
  }

  .tool-item.tool-fast-forward {
    min-width: 74px !important;
    background: rgba(0, 229, 255, 0.1) !important;
    border: 1px solid rgba(0, 229, 255, 0.35) !important;
  }

  header.inshot-top-bar {
    height: auto !important;
    min-height: 44px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .top-left {
    gap: 4px !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .btn-icon-back {
    min-width: 26px !important;
    width: 26px !important;
    height: 26px !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
  }

  .mode-toggle-group {
    padding: 1px !important;
    gap: 1px !important;
    flex-shrink: 0 !important;
  }

  .btn-mode-pill {
    padding: 3px 5px !important;
    font-size: 9.5px !important;
  }

  .top-app-title {
    display: inline-block !important;
    font-size: 12px !important;
  }

  .btn-top-open {
    font-size: 11px !important;
    height: 26px !important;
    padding: 0 7px !important;
    flex-shrink: 0 !important;
  }

  .top-right {
    gap: 3px !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-left: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  .top-right::-webkit-scrollbar {
    display: none !important;
  }

  .btn-top-landscape {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
  }

  .btn-top-shortcuts {
    display: none !important;
    /* 모바일 헤더에서는 내보내기 버튼 보존을 위해 은닉 */
  }

  .kbd-badge {
    display: none !important;
    /* 모바일에서는 터치 환경이므로 키보드 배지 은닉 */
  }

  .btn-top-autocut {
    height: 28px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
  }

  .btn-top-settings {
    height: 28px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
  }

  .btn-top-preview {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    background: rgba(0, 229, 255, 0.15) !important;
    border: 1px solid rgba(0, 229, 255, 0.45) !important;
    color: #00e5ff !important;
    flex-shrink: 0 !important;
  }

  #btn-top-export,
  .btn-save-pill {
    height: 28px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    z-index: 100 !important;
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.6) !important;
  }

  /* 모바일 내보내기 예상 화면 미리보기 플레이어 최적화 */
  .export-preview-dialog {
    padding: 12px 10px !important;
    max-height: 98vh !important;
    border-radius: 16px !important;
    gap: 8px !important;
  }

  .export-preview-title {
    font-size: 13.5px !important;
  }

  .export-preview-stage-wrap {
    max-height: 40vh !important;
  }

  .export-preview-controls-bar {
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  .btn-prev-play {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
  }

  .btn-prev-step {
    padding: 0 6px !important;
    height: 28px !important;
    font-size: 10px !important;
  }

  .export-preview-time-display {
    font-size: 10px !important;
  }

  .preview-jump-chip {
    font-size: 10px !important;
    padding: 4px 7px !important;
  }

  .btn-inshot-preview-action {
    font-size: 11.5px !important;
    padding: 10px 6px !important;
  }

  .btn-export-prev-save {
    font-size: 12.5px !important;
    padding: 10px !important;
  }

  .btn-export-prev-close {
    font-size: 11.5px !important;
    padding: 10px !important;
  }

  /* [모바일 100% WYSIWYG] 상하 검은 여백(레터박스) 0px 완전 밀착 */
  .viewport-box {
    flex: 0 0 auto !important;
    height: auto !important;
    background: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .canvas-wrapper {
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .timeline-wrapper {
    flex: 1 1 auto !important;
    min-height: 98px !important;
    height: auto !important;
  }

  /* 모바일 액션 바: 전광판은 상단 행(order: -1)에 독립 유지, 컨트롤 버튼들은 하단 행에 나란히 배치 */
  section.inshot-action-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  body.mode-tennis:not(.stats-mode-auto) .tennis-live-metrics-bar {
    order: -1 !important;
    width: 100% !important;
    min-height: 52px !important;
    margin: 2px 0 1px 0 !important;
  }

  .action-left {
    order: 1 !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
  }

  .action-right {
    order: 2 !important;
    gap: 4px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    margin-left: auto !important;
  }

  .btn-top-swipe-toggle,
  #btn-swipe-mode-toggle {
    padding: 3px 8px !important;
    font-size: 10.5px !important;
    height: 26px !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    margin-left: auto !important;
  }

  .btn-point-single-edit {
    min-height: 48px !important;
    gap: 2px !important;
  }

  .btn-point-single-edit .edit-btn-icon {
    font-size: 15px !important;
  }

  .btn-point-single-edit .edit-btn-text {
    font-size: 11px !important;
  }

  .btn-action-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
  }

  #btn-undo,
  #btn-redo {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
    border-radius: 9px !important;
  }

  .btn-action-icon.btn-play-pill {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
    border-radius: 9px !important;
  }

  #btn-quick-speed {
    padding: 0 7px !important;
    font-size: 11px !important;
    height: 28px !important;
  }

  #btn-action-rally-swap {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    border-radius: 12px !important;
    gap: 3px !important;
  }

  .btn-action-autocut-toggle {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }

  .time-code {
    font-size: 10.5px !important;
    white-space: nowrap !important;
  }

  /* 모바일 서브 & 리턴 스마트 토글 바 최적화 (오른쪽 엄지손가락 원터치 편집 편의) */
  .precision-serve-chip-row {
    padding: 4px 6px !important;
    gap: 4px !important;
    justify-content: flex-end !important;
  }

  .precision-smart-toggle-btn {
    min-height: 34px !important;
    padding: 3px 6px !important;
    gap: 5px !important;
    width: 110px !important;
    max-width: 125px !important;
    flex: 0 0 auto !important;
  }

  .label-active-server-name,
  .label-active-receiver-name {
    display: none !important;
  }

  /* 노애드(No-Ad) 결정점 선택 시에만 3등분 전체 너비 100% 균등 배치 유지 */
  .precision-serve-chip-row.has-noad,
  .precision-serve-chip-row:has(#btn-toggle-noad-rec:not([style*="display: none"])) {
    justify-content: space-between !important;
  }

  .precision-serve-chip-row.has-noad #precision-server-info-badge,
  .precision-serve-chip-row:has(#btn-toggle-noad-rec:not([style*="display: none"])) #precision-server-info-badge {
    display: none !important;
  }

  .precision-serve-chip-row.has-noad .precision-smart-toggle-btn,
  .precision-serve-chip-row:has(#btn-toggle-noad-rec:not([style*="display: none"])) .precision-smart-toggle-btn {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
  }

  .precision-serve-chip-row.has-noad .label-active-server-name,
  .precision-serve-chip-row.has-noad .label-active-receiver-name {
    display: inline !important;
  }

  .toggle-indicator-dot {
    width: 7px !important;
    height: 7px !important;
  }

  .toggle-title {
    font-size: 10.5px !important;
  }

  .toggle-hint {
    font-size: 8.5px !important;
  }

  .precision-group-divider {
    height: 18px !important;
    margin: 0 1px !important;
  }




  .grip-icon {
    font-size: 10px !important;
  }

  .grip-label {
    font-size: 7px !important;
  }

  .tennis-score-point-bar {
    padding: 3px 5px !important;
    gap: 4px !important;
    height: 98px !important;
  }

  body.tennis-swipe-pad-active .tennis-score-point-bar {
    height: 148px !important;
  }

  .btn-score-point {
    min-height: 44px !important;
  }

  .score-btn-left {
    flex: 0 0 68% !important;
    padding: 2px 3px !important;
  }

  .score-player-cell {
    font-size: 11.5px !important;
    padding: 2px 3px !important;
    min-height: 38px !important;
  }

  .score-btn-right {
    min-height: 40px !important;
  }

  .sb-cell {
    font-size: 11.5px !important;
    min-width: 16px !important;
  }

  .score-plus-badge {
    font-size: 9.5px !important;
    padding: 2px 4px !important;
  }

  .score-point-center {
    min-width: 86px !important;
    max-width: 102px !important;
    padding: 2px 4px !important;
  }

  .btn-point-undo,
  .btn-point-batch {
    font-size: 9.5px !important;
    padding: 2px 3px !important;
  }

  .score-match-points {
    font-size: 13.5px !important;
  }

  .btn-score-point {
    padding: 0 !important;
    min-height: 36px !important;
    touch-action: manipulation !important;
  }

  .score-btn-left {
    flex: 0 0 68% !important;
    width: 68% !important;
    max-width: 68% !important;
    gap: 2px !important;
    padding: 2px 3px !important;
    border-right: 3px solid rgba(0, 0, 0, 0.85) !important;
    box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.4) !important;
    background: rgba(0, 0, 0, 0.26) !important;
    border-radius: 6px 0 0 6px !important;
  }

  .score-team-tag {
    font-size: 8px !important;
    padding: 1.5px 3px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
  }

  .score-player-cell {
    font-size: 11px !important;
    padding: 2px 3px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.32) !important;
    background: rgba(0, 0, 0, 0.45) !important;
  }

  /* 모바일 세로모드: 선수 번호(1,2,3,4)가 가려지지 않도록 범실 숫자 배지 숨김 & 번호 배지 고정 */
  body:not(.mobile-landscape-mode) .pcell-ue-count {
    display: none !important;
  }

  .pcell-key-badge {
    flex-shrink: 0 !important;
    min-width: 15px !important;
    width: 15px !important;
    height: 15px !important;
  }

  .pcell-name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .score-btn-right {
    flex: 0 0 32% !important;
    width: 32% !important;
    max-width: 32% !important;
    gap: 3px !important;
    padding: 2px 2px !important;
    justify-content: center !important;
    border-left: 2.5px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.8), inset 1px 0 5px rgba(0, 0, 0, 0.65) !important;
    border-radius: 0 6px 6px 0 !important;
  }

  .score-bar-board-block {
    height: 22px !important;
  }

  .sb-cell {
    font-size: 10px !important;
    padding: 0 2.5px !important;
    min-width: 15px !important;
  }

  .sb-cell.sb-points {
    min-width: 20px !important;
  }

  .score-plus-badge {
    font-size: 9px !important;
    padding: 1.5px 3.5px !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  header.inshot-top-bar {
    height: auto !important;
    min-height: 48px !important;
    padding: 4px 10px !important;
    flex-wrap: wrap !important;
    row-gap: 4px !important;
    overflow: visible !important;
  }

  .btn-top-swipe-toggle,
  #btn-swipe-mode-toggle {
    flex-shrink: 0 !important;
  }
}

@media (max-width: 380px) {
  .btn-top-autocut {
    display: none !important;
    /* On extremely narrow screens (<380px) hide auto-cut from header to keep 내보내기 visible */
  }

  .time-code {
    font-size: 9.5px !important;
  }

  .btn-action-autocut-toggle {
    font-size: 9.5px !important;
    padding: 2px 5px !important;
  }
}

/* InShot Signature Home Screen Layout */
.inshot-home-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #121214;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 24px 20px;
  color: #fff;
  box-sizing: border-box;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.home-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-app-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fb2c53, #ff5e3a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(251, 44, 83, 0.45);
}

.home-logo-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-pro-badge {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
  transition: transform 0.15s;
}

.btn-pro-badge:active {
  transform: scale(0.94);
}

.btn-settings-icon {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}

.btn-settings-icon:hover {
  color: #fff;
}

.home-section-title {
  font-size: 14px;
  font-weight: 800;
  color: #8e8e93;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.home-mode-select-header {
  margin-bottom: 14px;
}

.home-mode-subtitle {
  font-size: 12px;
  color: var(--inshot-subtext);
  margin-top: 4px;
  line-height: 1.4;
}

/* Main Mode Selection Cards (가장 첫 진입 시 선택) */
.home-main-modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.home-mode-card {
  background: var(--inshot-card);
  border: 1.5px solid var(--inshot-border);
  border-radius: 18px;
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.home-mode-card:active {
  transform: scale(0.96);
}

.home-mode-card.mode-card-general {
  border-color: rgba(255, 255, 255, 0.15);
}

.home-mode-card.mode-card-general:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: #323236;
}

.home-mode-card.mode-card-tennis {
  background: linear-gradient(155deg, #162419, #101511);
  border-color: rgba(204, 255, 0, 0.4);
}

.home-mode-card.mode-card-tennis:hover {
  border-color: var(--inshot-tennis);
  box-shadow: 0 6px 20px rgba(204, 255, 0, 0.25);
}

.mode-card-badge {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ccc;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.mode-card-badge.badge-tennis {
  background: rgba(204, 255, 0, 0.2);
  color: var(--inshot-tennis);
  border: 1px solid rgba(204, 255, 0, 0.4);
}

.mode-card-icon {
  font-size: 34px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.mode-card-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.mode-card-desc {
  font-size: 11px;
  color: var(--inshot-subtext);
  line-height: 1.45;
  margin-bottom: 14px;
  flex: 1;
}

.mode-card-btn {
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 20px;
  text-align: center;
  background: #36363c;
  color: #fff;
  transition: background 0.15s;
}

.mode-card-btn.btn-tennis-cta {
  background: var(--inshot-tennis);
  color: #000;
  font-weight: 900;
}

/* InShot 3 Main Creation Cards Grid */
.create-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}

.create-card {
  background: #1c1c1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.create-card:hover,
.create-card:active {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.card-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.card-video .card-icon-circle {
  background: linear-gradient(135deg, #fb2c53, #ff5e3a);
}

.card-tennis .card-icon-circle {
  background: linear-gradient(135deg, #184c31, #257a4e);
  border: 2px solid #ffd600;
  box-shadow: 0 6px 16px rgba(255, 214, 0, 0.25);
}

.card-photo .card-icon-circle {
  background: linear-gradient(135deg, #0091ff, #00c6ff);
}

.create-card-label {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.create-card-sub {
  font-size: 11px;
  color: #888;
  font-weight: 700;
  text-align: center;
}

/* Recent Drafts List */
.drafts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.draft-item-card {
  background: #1c1c1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s;
}

.draft-item-card:hover,
.draft-item-card:active {
  background: #25252a;
  border-color: rgba(255, 255, 255, 0.15);
}

.draft-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.draft-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.draft-title {
  font-size: 14px;
  font-weight: 800;
  color: #eee;
  margin-bottom: 3px;
}

.draft-meta {
  font-size: 11px;
  color: #777;
  font-weight: 600;
}

.draft-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-draft-resume {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #eee;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-draft-resume:hover {
  background: var(--inshot-coral);
  border-color: var(--inshot-coral);
  color: #fff;
}

.btn-draft-delete {
  background: none;
  border: none;
  color: #666;
  font-size: 15px;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-draft-delete:hover {
  background: rgba(251, 44, 83, 0.15);
  color: var(--inshot-coral);
}

.empty-drafts-box {
  background: #18181c;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 13px;
  font-weight: 600;
}

/* PWA Install Banner & iOS Modal */
.home-pwa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(7, 19, 41, 0.95), rgba(11, 30, 61, 0.92));
  border: 1px solid rgba(217, 255, 0, 0.4);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(217, 255, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.home-pwa-banner:hover {
  transform: translateY(-1px);
  border-color: #d9ff00;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 24px rgba(217, 255, 0, 0.2);
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pwa-banner-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #071329;
  border: 1.5px solid rgba(217, 255, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d9ff00;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(217, 255, 0, 0.25);
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pwa-banner-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.2px;
}

.pwa-banner-title .pwa-badge {
  background: #d9ff00;
  color: #071329;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0;
}

.pwa-banner-desc {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-action-btn {
  background: #d9ff00;
  color: #071329;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(217, 255, 0, 0.35);
  transition: all 0.15s;
}

.pwa-banner-action-btn:hover {
  background: #f5ff66;
  transform: scale(1.04);
}

.btn-pwa-header-icon {
  background: rgba(217, 255, 0, 0.12);
  border: 1px solid rgba(217, 255, 0, 0.4);
  color: #d9ff00;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-pwa-header-icon:hover {
  background: #d9ff00;
  color: #071329;
}

/* iOS Install Guide Modal */
.pwa-guide-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeInModal 0.2s ease-out;
}

.pwa-guide-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 24px 20px 32px;
  box-sizing: border-box;
  color: #fff;
  position: relative;
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.pwa-guide-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.pwa-guide-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d9ff00;
  color: #071329;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-guide-step-txt {
  font-size: 13px;
  line-height: 1.4;
  color: #e2e8f0;
  font-weight: 600;
}

/* Bottom Tools Reorder Modal */
.reorder-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

.reorder-modal {
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  color: #fff;
}

.reorder-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.reorder-head-title {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reorder-badge {
  background: #d9ff00;
  color: #071329;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

.reorder-close-x {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.reorder-head-desc {
  font-size: 12px;
  color: #94a3b8;
  padding: 0 20px 14px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reorder-tools-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reorder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 8px 12px;
  transition: background 0.15s;
}

.reorder-item.top-ranked {
  border-color: rgba(217, 255, 0, 0.35);
  background: rgba(217, 255, 0, 0.05);
}

.reorder-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reorder-item-rank {
  font-size: 11px;
  font-weight: 800;
  color: #888;
  width: 18px;
  text-align: center;
}

.reorder-item.top-ranked .reorder-item-rank {
  color: #d9ff00;
}

.reorder-item-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.reorder-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #eee;
}

.reorder-item-actions {
  display: flex;
  gap: 4px;
}

.btn-reorder-move {
  background: #2a2a32;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccc;
  font-size: 12px;
  font-weight: 900;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-reorder-move:hover:not(:disabled) {
  background: #d9ff00;
  color: #071329;
}

.btn-reorder-move:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn-reorder-delete {
  background: rgba(251, 44, 83, 0.15);
  border: 1px solid rgba(251, 44, 83, 0.35);
  color: #ff6b8b;
  font-size: 11px;
  font-weight: 800;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.btn-reorder-delete:hover {
  background: #fb2c53;
  color: #fff;
}

.reorder-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #94a3b8;
  margin: 12px 0 4px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reorder-item.hidden-tool {
  opacity: 0.65;
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-reorder-restore {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #00e676;
  font-size: 11.5px;
  font-weight: 800;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-reorder-restore:hover {
  background: #00e676;
  color: #000;
}

/* Layout Height Slider & Preset Styles */
.btn-layout-preset {
  flex: 1;
  background: #232328;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ddd;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-layout-preset:hover,
.btn-layout-preset:active {
  background: #33333d;
  color: #fff;
  border-color: var(--inshot-tennis);
}

.layout-slider-group {
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.layout-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}

.layout-slider-val {
  font-family: monospace;
  font-size: 12.5px;
  color: var(--inshot-tennis);
  font-weight: 900;
}

.layout-slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--inshot-tennis);
  cursor: pointer;
  height: 6px;
}

.reorder-actions-bar {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #101014;
}

.btn-reorder-reset {
  flex: 1;
  background: #24242c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #aaa;
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-reorder-save {
  flex: 1.5;
  background: #d9ff00;
  border: none;
  color: #071329;
  font-size: 13.5px;
  font-weight: 900;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 255, 0, 0.25);
}

/* ========================================================
       InShot Home Primary Actions & Mode Selection Modal
       ======================================================== */
.inshot-primary-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.inshot-primary-card {
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.inshot-primary-card:active {
  transform: scale(0.97);
}

.inshot-primary-card.card-create-new {
  background: linear-gradient(135deg, #fb2c53 0%, #ff5722 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 26px rgba(251, 44, 83, 0.4);
}

.inshot-primary-card.card-load-existing {
  background: linear-gradient(145deg, #25252b 0%, #1a1a1f 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.inshot-primary-card:hover {
  transform: translateY(-2px);
}

.primary-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.primary-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.card-load-existing .primary-icon-circle {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.primary-card-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}

.primary-card-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  line-height: 1.35;
}

.card-load-existing .primary-card-desc {
  color: #9ca3af;
}

.primary-card-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  flex-shrink: 0;
  white-space: nowrap;
}

.card-load-existing .primary-card-badge {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Project Mode Selection Modal (파일 선택 후 일반/테니스 편집모드 선택) */
.project-choice-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

.project-choice-modal {
  background: #16161b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
  color: #fff;
  box-sizing: border-box;
}

.choice-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.choice-head-title {
  font-size: 16.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.choice-badge {
  background: #d9ff00;
  color: #071329;
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 8px;
}

.choice-close-x {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #aaa;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-head-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 14px;
}

.selected-file-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}

.selected-file-pill .file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffd600;
}

.choice-options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #222228;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.choice-option-card:active {
  transform: scale(0.97);
}

.choice-option-card.card-mode-general:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: #282830;
}

.choice-option-card.card-mode-tennis {
  background: linear-gradient(145deg, #16261a 0%, #121814 100%);
  border-color: rgba(204, 255, 0, 0.45);
}

.choice-option-card.card-mode-tennis:hover {
  border-color: #ccff00;
  box-shadow: 0 6px 20px rgba(204, 255, 0, 0.2);
}

.choice-option-card.card-mode-pickleball {
  background: linear-gradient(145deg, #2a1f10 0%, #181410 100%);
  border-color: rgba(251, 146, 60, 0.45);
}

.choice-option-card.card-mode-pickleball:hover {
  border-color: #fb923c;
  box-shadow: 0 6px 20px rgba(251, 146, 60, 0.2);
}

.choice-option-card.card-mode-badminton {
  background: linear-gradient(145deg, #0e2233 0%, #10161f 100%);
  border-color: rgba(56, 189, 248, 0.45);
}

.choice-option-card.card-mode-badminton:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

.choice-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.card-mode-tennis .choice-card-icon {
  background: rgba(204, 255, 0, 0.15);
  border: 1px solid rgba(204, 255, 0, 0.35);
}

.card-mode-pickleball .choice-card-icon {
  background: rgba(251, 146, 60, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.35);
}

.card-mode-badminton .choice-card-icon {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.choice-card-body {
  flex: 1;
  min-width: 0;
}

.choice-card-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.choice-sub-badge {
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #ddd;
}

.card-mode-tennis .choice-sub-badge {
  background: #ccff00;
  color: #071329;
}

.card-mode-pickleball .choice-sub-badge {
  background: #fb923c;
  color: #071329;
}

.card-mode-badminton .choice-sub-badge {
  background: #38bdf8;
  color: #071329;
}

.choice-card-text {
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.4;
}

.choice-arrow {
  font-size: 16px;
  color: #888;
  font-weight: 900;
  flex-shrink: 0;
}

/* ========================================================
       [프로 방송 3대 기능] 효과음, 리플레이 배지, 서브/리턴 정밀 칩 & 통계 모달 CSS
       ======================================================== */
/* 1. 리플레이 방송 배지 오버레이 */
.replay-badge-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 21;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid #ef4444;
  border-radius: 20px;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
  animation: replayPulseBorder 1.5s infinite alternate;
}

@keyframes replayPulseBorder {
  0% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  }

  100% {
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.85);
  }
}

.replay-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: replayBlinkDot 0.8s infinite;
}

@keyframes replayBlinkDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.85);
  }
}

.replay-badge-text {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
}

/* 2. 스마트 2nd 서브 & 리턴 에러 토글 바 (웹 기본: 균등 전체 너비 1:1 분할 배치) */
.precision-serve-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  background: #0d131f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 76;
}

.precision-row-upper {
  display: contents;
}

.precision-row-lower,
.btn-landscape-rally-start,
.btn-landscape-play-pause {
  display: none !important;
}

.precision-group-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  margin: 0 2px;
}

.precision-smart-toggle-btn {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 8px;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: #cbd5e1;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.precision-smart-toggle-btn:active {
  transform: scale(0.97);
}

.toggle-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.toggle-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.22;
  text-align: left;
}

.toggle-title {
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  color: #e2e8f0;
}

.toggle-hint {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

/* 2nd 서브 활성화 (앰버 골드) */
.precision-smart-toggle-btn.active#btn-toggle-serve-2nd {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28) 0%, rgba(180, 83, 9, 0.5) 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35) !important;
}

.precision-smart-toggle-btn.active#btn-toggle-serve-2nd .toggle-indicator-dot {
  background: #f59e0b !important;
  box-shadow: 0 0 6px #f59e0b !important;
}

.precision-smart-toggle-btn.active#btn-toggle-serve-2nd .toggle-title {
  color: #fbbf24 !important;
}

.precision-smart-toggle-btn.active#btn-toggle-serve-2nd .toggle-hint {
  color: #fde68a !important;
  font-weight: 700 !important;
}

/* 3단 서브 토글: 더블폴트 (DF) 활성화 스타일 */
.precision-smart-toggle-btn.df-active#btn-toggle-serve-2nd,
.precision-smart-toggle-btn.active#btn-trigger-double-fault {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.38) 0%, rgba(185, 28, 28, 0.65) 100%) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.55) !important;
}

.precision-smart-toggle-btn.df-active#btn-toggle-serve-2nd .toggle-indicator-dot,
.precision-smart-toggle-btn.active#btn-trigger-double-fault .toggle-indicator-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 8px #ef4444 !important;
  animation: pulseUeDot 1.2s infinite;
}

.precision-smart-toggle-btn.df-active#btn-toggle-serve-2nd .toggle-title,
.precision-smart-toggle-btn.active#btn-trigger-double-fault .toggle-title {
  color: #fca5a5 !important;
}

.precision-smart-toggle-btn.df-active#btn-toggle-serve-2nd .toggle-hint,
.precision-smart-toggle-btn.active#btn-trigger-double-fault .toggle-hint {
  color: #fecaca !important;
  font-weight: 800 !important;
}

/* 언포스드 에러(UE) 스마트 칩 바 (선수 이름칸 통합으로 완전 숨김) */
.precision-ue-chip-row {
  display: none !important;
}

.ue-chip-title {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.ue-chips-container {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.ue-chip-btn {
  flex: 1;
  min-width: 0;
  padding: 5px 2px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ue-chip-btn:active {
  transform: scale(0.96);
}

.ue-chip-btn.active-none {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: #38bdf8 !important;
  color: #7dd3fc !important;
  font-weight: 800 !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.3) !important;
}

.ue-chip-btn.active-ue {
  background: rgba(244, 63, 94, 0.28) !important;
  border-color: #f43f5e !important;
  color: #fda4af !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.38) !important;
}

.ue-chip-switch-btn {
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 214, 0, 0.4);
  background: rgba(255, 214, 0, 0.12);
  color: #ffd600;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
}

@keyframes pulseUeDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* 리턴 에러 활성화 (코랄 레드) */
.precision-smart-toggle-btn.active#btn-toggle-return-err {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.28) 0%, rgba(190, 18, 60, 0.5) 100%) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.35) !important;
}

.precision-smart-toggle-btn.active#btn-toggle-return-err .toggle-indicator-dot {
  background: #f43f5e !important;
  box-shadow: 0 0 6px #f43f5e !important;
}

.precision-smart-toggle-btn.active#btn-toggle-return-err .toggle-title {
  color: #fda4af !important;
}

.precision-smart-toggle-btn.active#btn-toggle-return-err .toggle-hint {
  color: #fecdd3 !important;
  font-weight: 700 !important;
}

@keyframes pulsePointRecommend {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(255, 214, 0, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.5);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 18px rgba(255, 214, 0, 1), 0 0 25px rgba(255, 214, 0, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.02);
  }
}

.btn-score-point.pulse-point-recommend {
  animation: pulsePointRecommend 0.8s 3 ease-in-out;
  border-color: #ffd600 !important;
}

/* 3. 경기 통계 모달 (Match Stats Modal) */
.match-stats-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}

.match-stats-dialog {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.match-stats-header {
  padding: 14px 16px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-stats-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========================================================
       [모바일 전용] 실시간 테니스 경기 통계 시트 모달 (Mobile Live Stats Sheet)
       ======================================================== */
.mobile-live-stats-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 12000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  animation: fadeInModal 0.2s ease-out;
}

.mobile-live-stats-dialog {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  height: 82vh;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 0.99) 100%);
  border-top: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.mobile-live-stats-handle-bar {
  width: 44px;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  margin: 10px auto 4px auto;
  flex-shrink: 0;
}

.mobile-live-stats-header {
  padding: 8px 16px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mobile-live-stats-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #f8fafc;
}

.btn-close-mobile-stats {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-live-stats-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.mobile-live-stats-footer {
  padding: 8px 14px 14px 14px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
  flex-shrink: 0;
}

.btn-mobile-stats-tv-card {
  flex: 1;
  padding: 9px 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-mobile-stats-close-bottom {
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
}

.btn-action-stats {
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

/* ========================================================
       [웹 전용] 실시간 테니스 경기통계 인포그래픽 사이드 패널 상세 스타일
       ======================================================== */


.live-stats-panel-header {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.90);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.live-stats-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-stats-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: liveDotPulse 1.2s infinite ease-in-out;
}

@keyframes liveDotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.live-stats-title {
  font-size: 12.5px;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.live-stats-badge {
  font-size: 9.5px;
  font-weight: 900;
  color: #020617;
  background: #10b981;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.2;
}

.live-stats-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-live-stats-act {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 11px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-live-stats-act:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-color: #38bdf8;
}

.live-stats-panel-content {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.live-stats-panel-content::-webkit-scrollbar {
  width: 4px;
}

.live-stats-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.live-stats-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.45);
}

.live-stat-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

/* 실전 경기데이터 분석 리포트 전용 스타일 (5대 핵심 지표 선수별 테이블) */
.live-report-card {
  background: linear-gradient(180deg, rgba(13, 23, 38, 0.98) 0%, rgba(2, 6, 23, 0.99) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 12px 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.report-card-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: rgba(56, 189, 248, 0.95);
  letter-spacing: -0.2px;
}

.report-main-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #ffd600;
  letter-spacing: -0.3px;
  text-shadow: 0 0 12px rgba(255, 214, 0, 0.3);
}

.report-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-metrics-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 11px;
}

.report-metrics-table thead tr th {
  padding: 6px 3px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  font-weight: 800;
  text-align: center;
}

.report-metrics-table thead tr th.th-metric {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  text-align: left;
  padding-left: 8px;
  color: #94a3b8;
  font-size: 10.5px;
  width: 32%;
}

.report-metrics-table thead tr th:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.report-metrics-table thead tr th.th-player {
  line-height: 1.25;
}

.report-metrics-table thead tr th.th-player.team-a .p-name {
  color: #38bdf8;
  font-weight: 900;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.report-metrics-table thead tr th.th-player.team-a .p-slot {
  color: rgba(56, 189, 248, 0.7);
  font-size: 8.5px;
  font-weight: 700;
}

.report-metrics-table thead tr th.th-player.team-b .p-name {
  color: #fb7185;
  font-weight: 900;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.report-metrics-table thead tr th.th-player.team-b .p-slot {
  color: rgba(251, 113, 133, 0.7);
  font-size: 8.5px;
  font-weight: 700;
}

.report-metrics-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.report-metrics-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.report-metrics-table tbody tr td {
  padding: 6px 3px;
  text-align: center;
  vertical-align: middle;
  border: none;
}

.report-metrics-table tbody tr td.td-metric {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  text-align: left;
  padding-left: 8px;
}

.report-metrics-table tbody tr td:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.report-metrics-table .td-metric .metric-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.2;
}

.report-metrics-table .td-metric .metric-desc {
  font-size: 8px;
  font-weight: 600;
  color: #64748b;
  margin-top: 1px;
}

.report-metrics-table .cell-val-main {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.report-metrics-table .cell-val-main.team-a {
  color: #38bdf8;
}

.report-metrics-table .cell-val-main.team-b {
  color: #fb7185;
}

.report-metrics-table .cell-val-main.is-hold {
  color: #34d399;
}

.report-metrics-table .cell-val-main.is-ret {
  color: #a5b4fc;
}

.report-metrics-table .cell-sub {
  font-size: 7.5px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 1px;
}

.report-metrics-table .cell-none {
  color: #475569;
  font-weight: 800;
  font-size: 11px;
}

.report-mini-bar {
  width: 80%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin: 2px auto 0;
}

.report-mini-bar .fill {
  height: 100%;
  border-radius: 2px;
}

.report-mini-bar .fill.team-a {
  background: #38bdf8;
}

.report-mini-bar .fill.team-b {
  background: #fb7185;
}

.report-mini-bar .fill.is-hold {
  background: #10b981;
}

.report-mini-bar .fill.is-ret {
  background: #818cf8;
}

.report-pill-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.report-pill-badge.good {
  background: rgba(16, 185, 129, 0.20);
  color: #34d399;
}

.report-pill-badge.warn {
  background: rgba(245, 158, 11, 0.20);
  color: #fbbf24;
}

.report-pill-badge.bad {
  background: rgba(244, 63, 94, 0.28);
  color: #fda4af;
}

.report-summary-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.report-summary-box .summary-head {
  font-size: 10px;
  font-weight: 900;
  color: #ffd600;
}

.report-summary-box .summary-text {
  font-size: 9.5px;
  color: #cbd5e1;
  line-height: 1.45;
}

/* 1. Score Summary */
.score-summary-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.90) 0%, rgba(30, 41, 59, 0.90) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.score-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.score-team {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.score-team.team-a {
  text-align: left;
}

.score-team.team-b {
  text-align: right;
}

.score-team .team-label {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.score-team.team-a .team-label {
  color: #38bdf8;
}

.score-team.team-b .team-label {
  color: #fb7185;
}

.score-team .team-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-center-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 8px;
  padding: 3px 10px;
  min-width: 68px;
}

.score-main-val {
  font-size: 17px;
  font-weight: 900;
  color: #ffd600;
  line-height: 1.1;
  font-family: 'Montserrat', sans-serif;
}

.score-sub-label {
  font-size: 8px;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 1px;
}

.score-server-indicator {
  font-size: 9.5px;
  color: #cbd5e1;
  text-align: center;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-server-indicator b {
  color: #38bdf8;
}

/* 2. Current Rally Card */
.current-rally-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.card-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rally-num-badge {
  font-size: 10px;
  font-weight: 800;
  color: #ffd600;
}

.rally-dur-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
}

.current-rally-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.live-tag-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.live-tag-pill.srv-1st {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.live-tag-pill.srv-2nd {
  color: #ffd600;
  border-color: rgba(255, 214, 0, 0.45);
  background: rgba(255, 214, 0, 0.1);
}

.live-tag-pill.srv-df {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.15);
}

.live-tag-pill.ret-in {
  color: #34d399;
}

.live-tag-pill.ret-err {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.12);
}

.live-tag-pill.ue-none {
  color: #64748b;
}

.live-tag-pill.ue-active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.live-tag-pill.pt-a {
  color: #38bdf8;
  font-weight: 900;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.live-tag-pill.pt-b {
  color: #fb7185;
  font-weight: 900;
  border-color: #fb7185;
  background: rgba(251, 113, 133, 0.15);
}

/* 3. Metrics Card */
.card-section-title {
  font-size: 10px;
  font-weight: 900;
  color: #ffd600;
  letter-spacing: -0.2px;
}

.metric-item-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metric-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-name {
  font-size: 9.5px;
  font-weight: 800;
  color: #e2e8f0;
}

.metric-val {
  font-size: 9.5px;
  font-weight: 800;
}

.metric-val.val-a {
  color: #38bdf8;
}

.metric-val.val-b {
  color: #fb7185;
}

.metric-val small {
  font-size: 8px;
  font-weight: 600;
  opacity: 0.75;
}

.metric-val.badge-pill {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
}

.metric-val.badge-pill.good {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.metric-val.badge-pill.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.metric-val.badge-pill.bad {
  background: rgba(244, 63, 94, 0.25);
  color: #fda4af;
}

.metric-dual-bar {
  display: flex;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  gap: 1px;
}

.dual-bar-fill.fill-a {
  background: #38bdf8;
  border-radius: 2px 0 0 2px;
  transition: width 0.2s ease;
}

.dual-bar-fill.fill-b {
  background: #fb7185;
  border-radius: 0 2px 2px 0;
  margin-left: auto;
  transition: width 0.2s ease;
}

.player-sub-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8px;
  color: #94a3b8;
  gap: 2px;
  padding-top: 1px;
}

.player-sub-metrics .p-sub.team-a {
  color: #7dd3fc;
}

.player-sub-metrics .p-sub.team-b {
  color: #fca5a5;
}

.p-sub-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* 4. Points & Tempo */
.points-comparison-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.points-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
}

.points-head .pts-a {
  color: #38bdf8;
}

.points-head .pts-b {
  color: #fb7185;
}

.points-head .pts-lbl {
  font-size: 8px;
  color: #94a3b8;
  font-weight: 700;
}

.points-bar-track {
  display: flex;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.pts-fill-a {
  background: #38bdf8;
  transition: width 0.2s ease;
}

.pts-fill-b {
  background: #fb7185;
  transition: width 0.2s ease;
}

.tempo-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 2px;
}

.tempo-cell {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tempo-cell-val {
  font-size: 10.5px;
  font-weight: 900;
  color: #f8fafc;
  font-family: 'Montserrat', sans-serif;
}

.tempo-cell-lbl {
  font-size: 7.5px;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 1px;
}

/* ========================================================
       [스코어보드 5종 테마 스타일링 (DOM 실시간 뷰 & 미리보기)]
       ======================================================== */
/* 1. 윔블던 클래식 (기본): 그린 & 로얄 퍼플 & 골드 */
.wimbledon-scoreboard.theme-wimbledon {
  border-color: rgba(255, 214, 0, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
}

.wimbledon-scoreboard.theme-wimbledon .ws-name-block {
  background: linear-gradient(180deg, #184c31 0%, #0d3420 100%);
}

.wimbledon-scoreboard.theme-wimbledon .ws-score-block {
  background: linear-gradient(180deg, #4f2764 0%, #351745 100%);
}

.wimbledon-scoreboard.theme-wimbledon .ws-cell {
  color: #ffe600;
}

.wimbledon-scoreboard.theme-wimbledon .ws-row.is-serving .ws-server-bar {
  background: #ffd600;
  box-shadow: 0 0 8px #ffd600;
}

/* 2. 롤랑가로스 클레이: 테라코타 오렌지 & 차콜 & 샌드 베이지 */
.wimbledon-scoreboard.theme-roland_garros {
  border-color: rgba(254, 215, 170, 0.85);
  box-shadow: 0 4px 14px rgba(124, 45, 18, 0.6);
}

.wimbledon-scoreboard.theme-roland_garros .ws-name-block {
  background: linear-gradient(180deg, #c2410c 0%, #7c2d12 100%);
}

.wimbledon-scoreboard.theme-roland_garros .ws-score-block {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.wimbledon-scoreboard.theme-roland_garros .ws-cell {
  color: #fed7aa;
}

.wimbledon-scoreboard.theme-roland_garros .ws-cell.ws-points {
  color: #ffffff;
}

.wimbledon-scoreboard.theme-roland_garros .ws-row.is-serving .ws-server-bar {
  background: #fb923c;
  box-shadow: 0 0 8px #f97316;
}

/* 3. US/호주오픈 블루: 일렉트릭 블루 & 딥 슬레이트 & 네온 시안 */
.wimbledon-scoreboard.theme-us_open {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
}

.wimbledon-scoreboard.theme-us_open .ws-name-block {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
}

.wimbledon-scoreboard.theme-us_open .ws-score-block {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.wimbledon-scoreboard.theme-us_open .ws-cell {
  color: #38bdf8;
}

.wimbledon-scoreboard.theme-us_open .ws-cell.ws-points {
  color: #ffffff;
}

.wimbledon-scoreboard.theme-us_open .ws-row.is-serving .ws-server-bar {
  background: #38bdf8;
  box-shadow: 0 0 8px #0284c7;
}

/* 4. 프로 투어 다크 미니멀: 럭셔리 매트 블랙 & 딥 카본 & 테니스 볼트라임 */
.wimbledon-scoreboard.theme-pro_dark {
  border-color: rgba(204, 255, 0, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95);
}

.wimbledon-scoreboard.theme-pro_dark .ws-name-block {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.wimbledon-scoreboard.theme-pro_dark .ws-score-block {
  background: linear-gradient(180deg, #090d16 0%, #000000 100%);
}

.wimbledon-scoreboard.theme-pro_dark .ws-cell {
  color: #ccff00;
}

.wimbledon-scoreboard.theme-pro_dark .ws-cell.ws-points {
  color: #ffffff;
}

.wimbledon-scoreboard.theme-pro_dark .ws-row.is-serving .ws-server-bar {
  background: #ccff00;
  box-shadow: 0 0 10px #ccff00;
}

/* 5. 나이트 세션 네온: 딥 나이트 퍼플 & 핫 핑크 마젠타 & 네온 사이언 */
.wimbledon-scoreboard.theme-neon_night {
  border-color: rgba(236, 72, 153, 0.9);
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.5);
}

.wimbledon-scoreboard.theme-neon_night .ws-name-block {
  background: linear-gradient(180deg, #3b0764 0%, #1e1b4b 100%);
}

.wimbledon-scoreboard.theme-neon_night .ws-score-block {
  background: linear-gradient(180deg, #831843 0%, #4c0519 100%);
}

.wimbledon-scoreboard.theme-neon_night .ws-cell {
  color: #06b6d4;
}

.wimbledon-scoreboard.theme-neon_night .ws-cell.ws-points {
  color: #f472b6;
}

.wimbledon-scoreboard.theme-neon_night .ws-row.is-serving .ws-server-bar {
  background: #f43f5e;
  box-shadow: 0 0 10px #ec4899;
}

/* TennisCut Universal Confirmation Modal (In-App Dialog) */
.tennis-confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.15s ease-out;
}

.tennis-confirm-modal {
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  width: 100%;
  max-width: 350px;
  padding: 24px 20px 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  color: #fff;
  box-sizing: border-box;
  text-align: center;
}

.tennis-confirm-icon {
  font-size: 38px;
  margin-bottom: 12px;
  line-height: 1;
}

.tennis-confirm-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  word-break: keep-all;
}

.tennis-confirm-message {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
  margin-bottom: 20px;
  white-space: pre-line;
  word-break: keep-all;
}

.tennis-confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-tennis-confirm-cancel {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-tennis-confirm-cancel:active {
  background: rgba(255, 255, 255, 0.15);
}

.btn-tennis-confirm-action {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  background: #ff4757;
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 71, 87, 0.35);
  transition: all 0.15s;
}

.btn-tennis-confirm-action:active {
  transform: scale(0.97);
}

/* ========================================================
       화면 레이아웃 직접 드래그 조절 모드 (On-Screen Interactive Drag Resizer)
       ======================================================== */
.layout-drag-divider {
  display: none;
  width: 100%;
  height: 24px;
  margin: -12px 0;
  position: relative;
  z-index: 120;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  align-items: center;
  justify-content: center;
}

body.layout-resizer-active .layout-drag-divider {
  display: flex !important;
  animation: resizerPulse 2.4s infinite ease-in-out;
}

@keyframes resizerPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(255, 214, 0, 0.4));
  }

  50% {
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.7));
  }
}

.layout-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: ns-resize;
  touch-action: none;
}

.drag-handle-pill {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  border: 1.5px solid #ffd600;
  box-shadow: 0 0 14px rgba(255, 214, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.85);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
}

.drag-handle-pill b {
  color: #ffd600;
  font-family: monospace, sans-serif;
}

.layout-drag-divider:hover .drag-handle-pill,
.layout-drag-divider.is-dragging .drag-handle-pill {
  transform: scale(1.08);
  border-color: #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.8), 0 4px 14px rgba(0, 0, 0, 0.95);
  color: #00e5ff;
}

.layout-drag-divider.is-dragging .drag-handle-pill b {
  color: #ffffff !important;
}

body.layout-resizer-active .tool-item[data-tool-id="layout-height"] {
  background: rgba(255, 214, 0, 0.25) !important;
  border-color: #ffd600 !important;
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.5) !important;
}

/* Floating Action Bar */
.layout-resizer-floating-bar {
  display: none;
  position: fixed;
  bottom: calc(var(--timeline-height, 98px) + env(safe-area-inset-bottom, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 540px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 214, 0, 0.45);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 214, 0, 0.25);
  padding: 8px 12px;
  z-index: 250;
  flex-direction: column;
  gap: 7px;
  box-sizing: border-box;
  animation: resizerBarSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resizerBarSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 18px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

body.layout-resizer-active .layout-resizer-floating-bar {
  display: flex !important;
}

.resizer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 5px;
}

.resizer-mode-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffd600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.resizer-tip {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.btn-resizer-close-x {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.12s ease;
}

.btn-resizer-close-x:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  border-color: #ef4444;
}

.resizer-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.resizer-presets-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-resizer-preset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.btn-resizer-preset:hover,
.btn-resizer-preset:active {
  background: rgba(255, 214, 0, 0.22);
  border-color: #ffd600;
  color: #ffd600;
}

.resizer-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.btn-resizer-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-resizer-reset:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-resizer-save {
  background: linear-gradient(135deg, #ffd600, #ffb300);
  border: none;
  color: #000;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 214, 0, 0.3);
  transition: all 0.12s ease;
  white-space: nowrap;
}

.btn-resizer-save:hover,
.btn-resizer-save:active {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(255, 214, 0, 0.5);
}


/* [웹 전용 최적화] 웹(PC)에서는 전광판을 뒤로가기, 앞으로가기 라인 오른쪽 빈 공간을 활용하여 1줄(Single-Line) 가로 배치로 통합 */
@media (min-width: 641px) {
  section.inshot-action-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 48px !important;
    padding: 0 14px !important;
    gap: 12px !important;
  }

  .action-left {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body.mode-tennis:not(.stats-mode-auto) .tennis-live-metrics-bar {
    display: flex !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 3px 14px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 0 4px !important;
    border: 1px solid rgba(0, 229, 255, 0.3) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(10, 22, 38, 0.85) 0%, rgba(17, 34, 58, 0.9) 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  }

  .action-right {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .tlm-line-1 {
    height: 22px !important;
    min-height: 22px !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  .tlm-badge {
    font-size: 11px !important;
    padding: 1.5px 6px !important;
  }

  .tlm-event-text {
    font-size: 12.5px !important;
    flex: 0 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tlm-line-2 {
    height: 22px !important;
    min-height: 22px !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    padding-left: 12px !important;
    border-left: 1px solid rgba(255, 255, 255, 0.16) !important;
    white-space: nowrap !important;
  }

  .tlm-player-stat-text {
    font-size: 12px !important;
    flex: 0 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tlm-line-3 {
    height: 22px !important;
    min-height: 22px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding-left: 12px !important;
    border-left: 1px solid rgba(255, 255, 255, 0.16) !important;
    white-space: nowrap !important;
  }

  .tlm-stats-desc {
    font-size: 11.5px !important;
  }

  .tlm-ratio-bar-wrap {
    width: 90px !important;
    height: 6px !important;
    flex-shrink: 0 !important;
  }
}


/* 모바일 액션 바 간소화: 체인지 버튼 옆 자동/정밀 및 통계 버튼 완전 숨김 */
#btn-action-stats-mode,
#btn-action-stats,
.btn-action-stats-mode,
.btn-action-stats {
  display: none !important;
}


/* ========================================================
       완전 자동 모드 (Stats-Mode-Auto) 전용 엄지 최적화 레이아웃
       - 영상 화면 위/밑으로 쾌적하고 넉넉한 빈 공간(여백)을 배치
       - 점수판을 팀 A / 팀 B 전용 대형 원터치 버튼으로 단순화하여 엄지 접근성 극대화
       - 랠리체인지 버튼 강조
       ======================================================== */
body.stats-mode-auto .viewport-box {
  background: #090c13 !important;
  padding: 22px 0 !important;
  box-sizing: border-box !important;
}

body.stats-mode-auto .canvas-wrapper {
  margin: auto !important;
}

/* 점수판: 복잡한 선수 범실 슬롯 대신 한눈에 들어오는 대형 팀 버튼 */
body.stats-mode-auto .score-player-slots {
  display: none !important;
}

body.stats-mode-auto .score-btn-left {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
  border-right: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 14px !important;
  cursor: pointer !important;
}

body.stats-mode-auto .score-team-tag {
  font-size: 14.5px !important;
  font-weight: 900 !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  letter-spacing: 0.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.stats-mode-auto .btn-score-point-a .score-team-tag {
  background: rgba(0, 229, 255, 0.22) !important;
  color: #00e5ff !important;
  border: 1.5px solid rgba(0, 229, 255, 0.45) !important;
  box-shadow: 0 2px 8px rgba(0, 229, 255, 0.25) !important;
}

body.stats-mode-auto .btn-score-point-b .score-team-tag {
  background: rgba(255, 59, 92, 0.22) !important;
  color: #ff3b5c !important;
  border: 1.5px solid rgba(255, 59, 92, 0.45) !important;
  box-shadow: 0 2px 8px rgba(255, 59, 92, 0.25) !important;
}

body.stats-mode-auto .score-btn-right {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 16px !important;
  border-left: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.stats-mode-auto .sb-cell.sb-points {
  font-size: 24px !important;
  font-weight: 900 !important;
  color: #ffd600 !important;
}

body.stats-mode-auto .score-plus-badge {
  font-size: 12px !important;
  font-weight: 900 !important;
  padding: 2px 8px !important;
  background: rgba(255, 214, 0, 0.2) !important;
  border: 1px solid #ffd600 !important;
  color: #ffd600 !important;
  border-radius: 6px !important;
}

body.stats-mode-auto .btn-score-point {
  height: 48% !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 6px !important;
  transition: transform 0.1s ease, filter 0.12s ease !important;
}

body.stats-mode-auto .btn-score-point:active {
  transform: scale(0.98) !important;
  filter: brightness(1.3) !important;
}

/* 랠리체인지 버튼: 한 손 엄지 손가락 최적화 강조 */
body.stats-mode-auto #btn-action-rally-swap {
  height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.28), rgba(0, 180, 216, 0.42)) !important;
  border: 1.5px solid #00e5ff !important;
  box-shadow: 0 3px 12px rgba(0, 229, 255, 0.35) !important;
  border-radius: 14px !important;
  color: #fff !important;
}


/* ========================================================
       230스포츠미디어 Official Branding & Business Info Styles
       ======================================================== */
.home-brand-subtag {
  font-size: 10px;
  font-weight: 800;
  color: #ff5a43;
  background: rgba(255, 90, 67, 0.12);
  border: 1px solid rgba(255, 90, 67, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}

.home-brand-subtag:hover {
  background: rgba(255, 90, 67, 0.25);
  border-color: #ff5a43;
  color: #fff;
}

.btn-home-about-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-home-about-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.home-footer-media230 {
  margin-top: 36px;
  padding: 24px 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #8e8e93;
  font-size: 11px;
  line-height: 1.6;
}

.home-footer-media230 .footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.home-footer-media230 .footer-logo-badge {
  background: #ff5a43;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.home-footer-media230 .footer-company-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.2px;
}

.home-footer-media230 .footer-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
}

.home-footer-media230 .btn-footer-support {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #38bdf8;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.home-footer-media230 .btn-footer-support:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

.home-footer-media230 .footer-contact-row {
  color: #94a3b8;
  font-size: 10.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.home-footer-media230 .footer-contact-row a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
}

.home-footer-media230 .footer-contact-row a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.home-footer-media230 .footer-dot {
  color: rgba(255, 255, 255, 0.2);
}

.home-footer-media230 .footer-address-row {
  color: #64748b;
  font-size: 10px;
  margin-bottom: 6px;
}

.home-footer-media230 .footer-copy-row {
  color: #475569;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

@media (max-width: 480px) {
  .btn-modal-tab {
    font-size: 10.5px !important;
    padding: 6px 3px !important;
  }

  .home-footer-media230 {
    padding: 18px 8px 12px;
  }
}

/* ========================================================
       [모바일 가로 100% 대화면 편집 모드: 우측 반투명 도크]
       - 배경 전체 100%에 화면 가득 비디오 재생 (공 크기 3~4배 확대)
       - 우측 35% 영역에 반투명 유리창으로 세로 모드 컨트롤(점수+타임라인) 오버레이
       - 오른손 엄지로 모든 기능 세로모드와 100% 동일하게 원터치 조작
       ======================================================== */
/* 세로(portrait) 상태에서는 가로 도크가 절대 화면을 가리거나 분할하지 못하도록 완벽 차단 */
/* (단, 앱 자체를 90도 회전시키는 '가상 가로' 모드일 때는 예외) */
@media (orientation: portrait) {

  body:not(.ml-pseudo-rotate) .mobile-landscape-dock,
  body:not(.ml-pseudo-rotate) #mobile-landscape-dock {
    display: none !important;
  }
}

/* 가로 레이아웃 오버라이드: body.mobile-landscape-mode 클래스는 JS가
       (실제 가로 화면) 또는 (가상 가로 회전 모드)일 때만 부여한다 */
@media all {
  .mobile-landscape-dock {
    position: fixed;
    top: 0;
    left: 50vw !important;
    right: 0;
    bottom: 0;
    width: 50vw !important;
    min-width: 50vw !important;
    max-width: 50vw !important;
    height: 100vh;
    z-index: 85;
    display: flex;
    flex-direction: column;
    /* 경기 영상을 100% 보면서 편집할 수 있도록 완전 투명 처리 */
    /* 경기 영상을 100% 보면서 편집할 수 있도록 완전 투명 처리 (오프스크린 RenderSurface 생성으로 인한 잔상을 막기 위해 will-change: opacity 및 isolation 제거) */
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none !important;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
    animation: mlDockSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: opacity, transform !important;
    isolation: isolate !important;
  }

  @keyframes mlDockSlideIn {
    from {
      transform: translateX(100%);
      opacity: 0;
    }

    to {
      transform: translateX(0);
      opacity: 1;
    }
  }

  .ml-dock-header {
    height: 32px;
    min-height: 32px;
    padding: 0 5px;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex-shrink: 0;
  }

  .ml-dock-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    text-shadow: 0 1px 3px #000, 0 0 6px #000;
    flex-shrink: 0;
  }

  .btn-ml-swipe-toggle {
    background: rgba(15, 23, 42, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #f8fafc !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    height: 24px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-shadow: 0 1px 3px #000 !important;
    transition: all 0.15s ease !important;
  }

  .btn-ml-swipe-toggle.active-swipe {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.28), rgba(14, 165, 233, 0.42)) !important;
    border-color: #00e5ff !important;
    color: #00e5ff !important;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.45) !important;
  }

  .btn-ml-exit {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #f8fafc !important;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-shadow: 0 1px 3px #000, 0 0 4px #000;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .btn-ml-exit:active {
    background: rgba(239, 68, 68, 0.6) !important;
    border-color: #ef4444 !important;
  }

  .ml-dock-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end !important;
    overflow: hidden;
    gap: 0 !important;
    background: transparent !important;
    padding-bottom: 38px !important;
    /* 아래 1cm (~38px) 띄워 하단 제스처바 간섭 차단 및 엄지 조작 최적화 */
    padding-bottom: 0 !important;
    /* 하단 제스처바 간섭 차단 여백은 #timeline-wrapper 내부 패딩으로 흡수하여 터치 불응 영역 완전 제거 */
    box-sizing: border-box !important;
  }

  /* 가로 대화면 모드 활성화 시 전체 레이아웃 오버라이드 */
  body.mobile-landscape-mode {
    overflow: hidden !important;
  }

  body.mobile-landscape-mode .inshot-top-bar,
  body.mobile-landscape-mode .layout-drag-divider,
  body.mobile-landscape-mode .btn-timeline-add-media {
    display: none !important;
  }

  /* =======================================================
         도크 내부 순서: 세로모드와 100% 동일 (완전 투명)
         1. inshot-action-bar (되돌리기/다시실행 줄 완전 제거, 현재시간/전체시간만 노출)
         2. tennis-submode-container (점수판 + 점수수정 단추)
         3. bottom-tools-wrapper (편집 도구모음)
         4. timeline-wrapper (타임라인 - 위아래 폭 98px)
         ======================================================= */

  /* 1. 액션 바: 가로모드에서는 상단 시간 줄을 완전 숨김 (타임라인 바늘 배지에서 현재/전체 시간 동시 표시) */
  body.mobile-landscape-mode #inshot-action-bar {
    display: none !important;
  }

  /* 2. 테니스 서브/점수판 (도크 내에는 점수판 및 점수수정 단추만 깔끔하게 유지) */
  body.mobile-landscape-mode #tennis-submode-container {
    flex: 0 0 auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 4px !important;
    margin: 0 !important;
  }

  /* [양손 편집 최적화] 폴트, 리턴범실 칸 + 랠리 시작 버튼: 가로모드에서만 화면 좌측 하단에 플로팅 */
  body.mobile-landscape-mode #precision-serve-chip-row {
    position: fixed !important;
    left: max(14px, calc(env(safe-area-inset-left, 0px) + 10px)) !important;
    bottom: 50px !important;
    /* 아래 여백 그대로 확보 (하단 제스처바 간섭 차단 및 왼손 엄지 파지 편의) */
    right: auto !important;
    top: auto !important;
    z-index: 250 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    /* 폴트/리턴범실 줄과 랠리시작 버튼 사이 충분한 간격 확보 (오터치 방지) */
    background: rgba(10, 16, 26, 0.94) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.85) !important;
    height: auto !important;
    width: max-content !important;
    min-width: 252px !important;
    max-width: calc(48vw - 20px) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  body.mobile-landscape-mode.ml-pseudo-rotate #precision-serve-chip-row {
    position: fixed !important;
    left: max(14px, calc(env(safe-area-inset-left, 0px) + 10px)) !important;
    bottom: 50px !important;
    right: auto !important;
    top: auto !important;
    max-width: calc(48vh - 20px) !important;
    z-index: 250 !important;
  }

  /* [인코딩 및 전체화면 모달 표시 중 오동작/시각 간섭 원천 차단]
         인코딩(동영상 변환 중) 진행 중이거나 전체화면 모달이 활성화된 경우 좌측 하단 플로팅 편집 버튼 완전 숨김 */
  body.is-exporting #precision-serve-chip-row,
  body.is-modal-open #precision-serve-chip-row,
  body:has(#inshot-export-modal:not([style*="display: none"])) #precision-serve-chip-row,
  body:has(#inshot-save-settings-modal:not([style*="display: none"])) #precision-serve-chip-row,
  body:has(#inshot-export-preview-modal:not([style*="display: none"])) #precision-serve-chip-row,
  body:has(.inshot-modal-backdrop:not([style*="display: none"])) #precision-serve-chip-row,
  body:has(.player-edit-modal-backdrop:not([style*="display: none"])) #precision-serve-chip-row,
  body:has(.match-stats-modal:not([style*="display: none"])) #precision-serve-chip-row {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.mobile-landscape-mode .precision-row-upper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body.mobile-landscape-mode #precision-server-info-badge {
    display: none !important;
  }

  body.mobile-landscape-mode #precision-serve-chip-row .precision-group-divider,
  body.mobile-landscape-mode #precision-serve-chip-row .kbd-badge {
    display: none !important;
  }

  body.mobile-landscape-mode .precision-smart-toggle-btn:not(#btn-toggle-noad-rec) {
    min-height: 36px !important;
    height: auto !important;
    padding: 6px 11px !important;
    width: auto !important;
    min-width: max-content !important;
    flex: 1 1 auto !important;
    gap: 6px !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    cursor: pointer !important;
  }

  body.mobile-landscape-mode #btn-toggle-serve-2nd {
    background: rgba(56, 189, 248, 0.18) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.55) !important;
  }

  body.mobile-landscape-mode #btn-toggle-serve-2nd:active {
    transform: scale(0.96) !important;
    background: rgba(56, 189, 248, 0.35) !important;
  }

  body.mobile-landscape-mode #btn-toggle-return-err {
    background: rgba(251, 113, 133, 0.18) !important;
    border: 1.5px solid rgba(251, 113, 133, 0.55) !important;
  }

  body.mobile-landscape-mode #btn-toggle-return-err:active {
    transform: scale(0.96) !important;
    background: rgba(251, 113, 133, 0.35) !important;
  }

  /* [수정] 노애드 리시버 변경 버튼: 40-40 노애드 결정점 상황에서만 단독 줄로 짤림 없이 노출 */
  body.mobile-landscape-mode #btn-toggle-noad-rec {
    min-height: 34px !important;
    height: auto !important;
    padding: 5px 10px !important;
    width: auto !important;
    max-width: none !important;
    flex: 1 1 100% !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    cursor: pointer !important;
  }

  body.mobile-landscape-mode #btn-toggle-noad-rec[style*="display: none"],
  body.mobile-landscape-mode .toggle-noad-rec[style*="display: none"],
  body.mobile-landscape-mode #btn-toggle-noad-rec.is-hidden {
    display: none !important;
  }

  body.mobile-landscape-mode #precision-serve-chip-row .toggle-text-wrap {
    overflow: visible !important;
  }

  body.mobile-landscape-mode #precision-serve-chip-row .toggle-title {
    font-size: 11.5px !important;
    font-weight: 800 !important;
    color: #fff !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  body.mobile-landscape-mode #precision-serve-chip-row .label-active-server-name,
  body.mobile-landscape-mode #precision-serve-chip-row .label-active-receiver-name {
    display: inline !important;
  }

  body.mobile-landscape-mode #precision-serve-chip-row .toggle-hint {
    display: none !important;
  }

  /* [신규 가로모드 전용] 랠리 시작 버튼 (일시정지/재생 버튼은 도구모음으로 이전, 랠리시작 단독 와이드 배치) */
  body.mobile-landscape-mode .precision-row-lower {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    margin-top: 2px !important;
  }

  body.mobile-landscape-mode .btn-landscape-rally-start {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.32), rgba(22, 163, 74, 0.42)) !important;
    border: 1.5px solid rgba(74, 222, 128, 0.75) !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 900 !important;
    letter-spacing: -0.3px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3) !important;
    padding: 0 10px !important;
    transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    white-space: nowrap !important;
  }

  body.mobile-landscape-mode .btn-landscape-play-pause {
    display: none !important;
  }

  body.mobile-landscape-mode .btn-landscape-play-pause.is-playing {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.42), rgba(217, 119, 6, 0.55)) !important;
    border-color: rgba(251, 191, 36, 0.9) !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5) !important;
  }

  body.mobile-landscape-mode .btn-landscape-rally-start:active,
  body.mobile-landscape-mode .btn-landscape-play-pause:active {
    transform: scale(0.96) !important;
  }

  body.mobile-landscape-mode .btn-landscape-rally-start.is-recording {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.45), rgba(220, 38, 38, 0.55)) !important;
    border-color: rgba(248, 113, 113, 0.9) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
  }

  body.mobile-landscape-mode .btn-landscape-rally-start.is-recording .ls-rally-icon {
    animation: rallyPulse 0.8s infinite alternate ease-in-out;
  }

  /* 점수 및 팀A/B 범실 바 위아래(상하) 폭 30% 추가 확대 (76px -> 100px) */
  body.mobile-landscape-mode .tennis-score-point-bar {
    min-height: 100px !important;
    height: 100px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.22)) !important;
    border-radius: 8px !important;
    padding: 3px !important;
    margin: 0 !important;
    margin-bottom: 2px !important;
    gap: 4px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  /* 점수수정 단추: 상하 확장에 맞춰 터치 영역 확보 */
  body.mobile-landscape-mode .score-point-center {
    display: flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 100% !important;
    align-items: stretch !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.mobile-landscape-mode .btn-point-single-edit {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    background: rgba(255, 214, 0, 0.16) !important;
    border: 1px solid rgba(255, 214, 0, 0.65) !important;
    background: rgba(255, 214, 0, var(--ml-card-bg-alpha, 0.16)) !important;
    border: 1px solid rgba(255, 214, 0, var(--ml-clip-border-alpha, 0.55)) !important;
    border-radius: 6px !important;
    color: #ffd600 !important;
    color: rgba(255, 214, 0, var(--ml-text-alpha, 0.9)) !important;
    box-shadow: none !important;
    padding: 2px !important;
    cursor: pointer !important;
  }

  body.mobile-landscape-mode .btn-point-single-edit .edit-btn-icon {
    font-size: 16px !important;
    line-height: 1 !important;
  }

  body.mobile-landscape-mode .btn-point-single-edit .edit-btn-text {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  body.mobile-landscape-mode .score-point-teams-col {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
    height: 100% !important;
    justify-content: space-between !important;
  }

  body.mobile-landscape-mode .score-point-teams-col.is-court-flipped {
    flex-direction: column-reverse !important;
  }

  /* 팀별 행 위아래(상하) 폭 30% 확대 (34px -> 45px) */
  body.mobile-landscape-mode .btn-score-point {
    flex: 1 1 0% !important;
    min-height: 45px !important;
    height: 45px !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: none !important;
    padding: 0 4px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  /* 선수 이름 영역: flex-direction: row 설정으로 서브권(✨)이 붙어도 위로 밀림 방지 */
  body.mobile-landscape-mode .score-btn-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    padding: 2px 4px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    border-right: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body.mobile-landscape-mode .score-team-tag {
    font-size: 10px !important;
    font-weight: 900 !important;
    padding: 4px 5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
  }

  body.mobile-landscape-mode .score-player-slots {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 4px !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body.mobile-landscape-mode .score-point-teams-col.is-court-flipped .score-player-slots {
    flex-direction: row-reverse !important;
  }

  /* 선수 칸 위아래(상하) 폭 30% 확대 (30px -> 39px) 및 글자 크기 확대 */
  body.mobile-landscape-mode .score-player-cell {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    height: 39px !important;
    max-height: 39px !important;
    padding: 0 3px !important;
    gap: 2px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #fff !important;
    color: rgba(255, 255, 255, var(--ml-text-alpha, 0.9)) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    background: rgba(0, 0, 0, var(--ml-card-bg-alpha, 0.25)) !important;
    border: 1px solid rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.28)) !important;
  }

  body.mobile-landscape-mode .score-player-cell .pcell-key-badge {
    width: 13px !important;
    min-width: 13px !important;
    height: 13px !important;
    font-size: 9px !important;
    margin-right: 2px !important;
  }

  /* 서브권일 때 칸 자체가 황금빛으로 반짝이므로 옆에 ✨ 아이콘 표시 제거 (선수 이름 잘림 방지) */
  body.mobile-landscape-mode .score-player-cell.is-serving-player {
    border: 1.5px solid #ffd600 !important;
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.38) 0%, rgba(255, 245, 157, 0.22) 100%) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
  }

  body.mobile-landscape-mode .score-player-cell.is-serving-player::after {
    content: none !important;
    display: none !important;
  }

  /* 모바일 가로모드 스와이프 코트 패드 모드 지원 */
  body.mobile-landscape-mode.tennis-swipe-pad-active .tennis-score-point-bar {
    height: 132px !important;
    min-height: 132px !important;
  }

  body.mobile-landscape-mode.tennis-swipe-pad-active #score-point-teams-col {
    display: none !important;
  }

  body.mobile-landscape-mode.tennis-swipe-pad-active .swipe-court-pad-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }

  body.mobile-landscape-mode.tennis-swipe-pad-active .swipe-quad {
    padding: 3px 5px !important;
  }

  body.mobile-landscape-mode.tennis-swipe-pad-active .swipe-quad-hint {
    font-size: 8.5px !important;
  }

  body.mobile-landscape-mode .score-player-cell.active-ue-player::before {
    content: '💥' !important;
    font-size: 9px !important;
    margin-right: 1.5px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }

  /* 우측 점수 영역: min-width 98px 보장으로 15대40, AD 등 2자리 포인트가 전혀 밀리지 않고 노출 */
  body.mobile-landscape-mode .score-btn-right {
    flex: 0 0 auto !important;
    min-width: 98px !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    padding: 1px 3px !important;
    gap: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    background: transparent !important;
    border-left: none !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
  }

  body.mobile-landscape-mode .score-bar-board-block {
    display: flex !important;
    align-items: stretch !important;
    height: 34px !important;
    background: linear-gradient(180deg, #4f2764 0%, #351745 100%) !important;
    border-radius: 5px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-landscape-mode .sb-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    color: #ffe600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.95) !important;
    font-weight: 900 !important;
  }

  body.mobile-landscape-mode .sb-cell.sb-games {
    min-width: 18px !important;
    padding: 0 3px !important;
    font-size: 12.5px !important;
    border-right: 1px solid rgba(0, 0, 0, 0.45) !important;
  }

  /* 15, 30, 40, AD 등 2자리 포인트가 넉넉히 다 보이도록 30px 너비 배정 */
  body.mobile-landscape-mode .sb-cell.sb-points {
    min-width: 30px !important;
    padding: 0 3px !important;
    font-size: 13.5px !important;
    background: rgba(0, 0, 0, 0.28) !important;
  }

  body.mobile-landscape-mode .score-plus-badge {
    min-width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 6px !important;
    font-size: 11.5px !important;
    font-weight: 900 !important;
    color: #ffd600 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 214, 0, 0.6) !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }

  body.mobile-landscape-mode .btn-score-point .kbd-badge {
    display: none !important;
  }

  /* =======================================================
         [모바일 가로모드 전용 컴팩트 레이아웃 (웹/PC 가로화면은 기존 100% 유지)]
         1) 좌측 하단(#precision-serve-chip-row): 왼손 엄지 터치에 최적화된 컴팩트 정사각형 박스
            - 상단 1줄: [폴트] [리턴 범실] 나란히 배치 (좌우·상하 폭 대폭 축소)
            - 하단 1줄: [랠리 시작] 배치
         2) 우측 점수 입력바(.tennis-score-point-bar):
            - '팀A 범실 / 팀B 범실' 태그(.score-team-tag) 숨김 -> 선수 이름만 깔끔하게 표시
            - 우측 스코어 숫자 칸(.score-bar-board-block) 숨김 -> [+1P] 버튼만 단독 노출
         ======================================================= */
  @media (max-width: 1024px),
  (hover: none) and (pointer: coarse) {

    body.mobile-landscape-mode #precision-serve-chip-row,
    body.mobile-landscape-mode.ml-pseudo-rotate #precision-serve-chip-row {
      left: max(10px, calc(env(safe-area-inset-left, 0px) + 8px)) !important;
      bottom: 44px !important;
      width: 146px !important;
      min-width: 146px !important;
      max-width: 146px !important;
      padding: 6px !important;
      gap: 5px !important;
      border-radius: 11px !important;
    }

    body.mobile-landscape-mode .precision-row-upper {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 4px !important;
      width: 100% !important;
    }

    body.mobile-landscape-mode .precision-smart-toggle-btn:not(#btn-toggle-noad-rec) {
      min-height: 34px !important;
      height: 34px !important;
      padding: 0 3px !important;
      width: 100% !important;
      min-width: 0 !important;
      border-radius: 7px !important;
      gap: 0 !important;
    }

    body.mobile-landscape-mode #precision-serve-chip-row .toggle-indicator-dot,
    body.mobile-landscape-mode #precision-serve-chip-row .label-active-server-name,
    body.mobile-landscape-mode #precision-serve-chip-row .label-active-receiver-name,
    body.mobile-landscape-mode #precision-serve-chip-row .toggle-hint,
    body.mobile-landscape-mode #precision-serve-chip-row .kbd-badge {
      display: none !important;
    }

    body.mobile-landscape-mode #precision-serve-chip-row .toggle-title {
      font-size: 10.5px !important;
      font-weight: 900 !important;
      letter-spacing: -0.4px !important;
      white-space: nowrap !important;
      text-align: center !important;
      line-height: 1.1 !important;
    }

    body.mobile-landscape-mode #btn-toggle-noad-rec {
      grid-column: 1 / -1 !important;
      min-height: 28px !important;
      height: 28px !important;
      padding: 0 4px !important;
      font-size: 10px !important;
    }

    body.mobile-landscape-mode .precision-row-lower {
      display: flex !important;
      width: 100% !important;
      margin-top: 0 !important;
      gap: 0 !important;
    }

    body.mobile-landscape-mode .btn-landscape-rally-start {
      width: 100% !important;
      flex: 1 1 100% !important;
      height: 36px !important;
      min-height: 36px !important;
      margin-top: 0 !important;
      padding: 0 6px !important;
      font-size: 11.5px !important;
      border-radius: 7px !important;
      gap: 4px !important;
      letter-spacing: -0.5px !important;
    }

    body.mobile-landscape-mode .btn-landscape-play-pause {
      display: none !important;
    }

    /* 우측: 팀A/팀B 범실 단추 숨김 (선수 이름만 노출) + 스코어 숨기고 +1P 단추만 노출 */
    body.mobile-landscape-mode .score-team-tag {
      display: none !important;
    }

    body.mobile-landscape-mode .score-bar-board-block {
      display: none !important;
    }

    body.mobile-landscape-mode .score-btn-right {
      min-width: 48px !important;
      width: auto !important;
      padding: 1px 2px !important;
      justify-content: center !important;
    }

    body.mobile-landscape-mode .score-plus-badge {
      min-width: 44px !important;
      height: 35px !important;
      font-size: 12.5px !important;
      padding: 0 8px !important;
    }
  }

  /* 3. 편집 도구모음: 깔끔한 가로 1줄 컴팩트 카드 정렬 및 터치 스크롤 최적화 */
  body.mobile-landscape-mode #ml-dock-body #bottom-tools-wrapper {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(10, 16, 26, 0.45) !important;
    background: rgba(10, 16, 26, var(--ml-card-bg-alpha, 0.25)) !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.16)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.10)) !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body.mobile-landscape-mode #ml-dock-body #bottom-tools-wrapper .btn-tools-scroll-nav,
  body.mobile-landscape-mode #ml-dock-body #bottom-tools-wrapper .btn-tools-layout-toggle {
    display: none !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    background: transparent !important;
    border: none !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }

  body.mobile-landscape-mode.ml-pseudo-rotate #ml-dock-body nav.inshot-bottom-tools,
  body.mobile-landscape-mode.ml-pseudo-rotate #ml-dock-body nav.inshot-bottom-tools .tool-item {
    touch-action: none !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools::-webkit-scrollbar {
    display: none !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-item {
    flex: 0 0 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    width: 54px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 3px 2px !important;
    gap: 2px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, var(--ml-card-bg-alpha, 0.10)) !important;
    border: 1px solid rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.20)) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    touch-action: pan-x pan-y !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, var(--ml-text-alpha, 0.9)) !important;
  }

  /* [핵심] 사용자가 설정에서 숨긴 도구(is-tool-hidden) 및 모드별 비활성 도구는 가로모드에서도 100% 숨김 유지 */
  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-item.is-tool-hidden,
  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-item[style*="display: none"],
  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-item[style*="display:none"],
  body.mode-tennis.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-general-only,
  body.mode-tennis.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-tennis-hide,
  body.mode-general.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-tennis-only {
    display: none !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-item:active {
    background: rgba(255, 255, 255, 0.22) !important;
    transform: scale(0.95) !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-item.is-dragging-tool {
    background: #232733 !important;
    border: 1.5px solid #00e5ff !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 16px rgba(0, 229, 255, 0.9) !important;
    transform: scale(1.12) translateY(-2px) !important;
    z-index: 100 !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-icon {
    font-size: 18px !important;
    height: 20px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    opacity: var(--ml-text-alpha, 0.9) !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .tool-name {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    color: #f8fafc !important;
    color: rgba(248, 250, 252, var(--ml-text-alpha, 0.9)) !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 50px !important;
    flex-shrink: 0 !important;
  }

  body.mobile-landscape-mode #ml-dock-body nav.inshot-bottom-tools .kbd-badge {
    display: none !important;
  }

  /* 모바일 가로모드 특수 도구별 시각적 강조 */
  body.mobile-landscape-mode #ml-dock-body #tool-play-pause {
    border-radius: 8px !important;
    background: rgba(74, 222, 128, 0.16) !important;
    border: 1px solid rgba(74, 222, 128, 0.45) !important;
  }

  body.mobile-landscape-mode #ml-dock-body #tool-play-pause.is-playing {
    background: rgba(245, 158, 11, 0.22) !important;
    border-color: rgba(251, 191, 36, 0.65) !important;
  }

  body.mobile-landscape-mode #ml-dock-body #tool-play-pause .tool-icon {
    color: #4ade80 !important;
    font-size: 16.5px !important;
  }

  body.mobile-landscape-mode #ml-dock-body #tool-play-pause.is-playing .tool-icon {
    color: #fbbf24 !important;
  }

  body.mobile-landscape-mode #ml-dock-body .tool-split {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
  }

  body.mobile-landscape-mode #ml-dock-body .tool-delete {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
  }

  body.mobile-landscape-mode #ml-dock-body .tool-rally-start {
    background: rgba(255, 214, 0, 0.18) !important;
    border: 1px solid rgba(255, 214, 0, 0.5) !important;
  }

  body.mobile-landscape-mode #ml-dock-body #tool-clip-order {
    background: rgba(249, 115, 22, 0.16) !important;
    border: 1px solid rgba(249, 115, 22, 0.45) !important;
  }

  /* 4. 타임라인: 가로모드 타임라인 터치 영역을 화면 바닥 끝까지 100% 확장 (하단 제스처 여백 28px을 내부 패딩으로 흡수) */
  body.mobile-landscape-mode #timeline-wrapper {
    flex: 0 0 auto !important;
    height: 96px !important;
    min-height: 96px !important;
    max-height: 96px !important;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
    margin: 0 !important;
    padding: 0 0 28px 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    contain: none !important;
    touch-action: pan-x pinch-zoom !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
  }

  body.mobile-landscape-mode .timeline-container {
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    background: transparent !important;
    touch-action: pan-x pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    will-change: scroll-position !important;
    will-change: auto !important;
  }

  body.ml-pseudo-rotate #timeline-wrapper,
  body.ml-pseudo-rotate .timeline-container {
    touch-action: none !important;
  }

  /* 가로모드에서 타임라인 클립 위쪽의 불필요한 자막 트랙 빈 공간 제거 */
  body.mobile-landscape-mode .track-subtitle,
  body.mobile-landscape-mode #subtitle-track {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.mobile-landscape-mode .tracks-area {
    padding-top: 1px !important;
    padding-bottom: 2px !important;
    gap: 1px !important;
    opacity: var(--ml-ui-opacity, 0.3);
    /* 오프스크린 RenderSurface 생성으로 인한 비디오 잔상(Ghosting)을 100% 방지하기 위해 group opacity 대신 개별 클립 rgba 알파 사용 */
    opacity: 1 !important;
  }

  body.mobile-landscape-mode .video-clip {
    -webkit-user-drag: none !important;
    transition: none !important;
    box-shadow: none !important;
    background: rgba(35, 35, 42, var(--ml-clip-bg-alpha, 0.28)) !important;
    border-color: rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.25)) !important;
    border-right-color: rgba(0, 0, 0, var(--ml-clip-border-alpha, 0.65)) !important;
    color: rgba(255, 255, 255, var(--ml-text-alpha, 0.85)) !important;
  }

  body.mobile-landscape-mode .video-clip.is-hl {
    background: rgba(56, 36, 44, var(--ml-clip-bg-alpha, 0.32)) !important;
  }

  body.mobile-landscape-mode .video-clip.selected {
    box-shadow: 0 0 0 1.5px rgba(255, 214, 0, 0.85) !important;
    background: rgba(47, 45, 58, var(--ml-clip-bg-alpha, 0.38)) !important;
    border: 2px solid rgba(255, 214, 0, var(--ml-text-alpha, 0.9)) !important;
    box-shadow: none !important;
  }

  body.mobile-landscape-mode .timeline-bookend-card {
    opacity: 1 !important;
    background: rgba(15, 23, 42, var(--ml-clip-bg-alpha, 0.28)) !important;
    border-color: rgba(255, 255, 255, var(--ml-clip-border-alpha, 0.25)) !important;
  }

  body.mobile-landscape-mode .video-track {
    height: 48px !important;
    min-height: 48px !important;
    background: transparent !important;
  }

  body.mobile-landscape-mode .ruler-track {
    height: 16px !important;
    background: transparent !important;
  }

  body.mobile-landscape-mode .timeline-clip {
    height: 44px !important;
    background: rgba(14, 165, 233, 0.28) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.7) !important;
  }

  body.mobile-landscape-mode .btn-timeline-zoom-chip {
    display: none !important;
  }

  /* 가로모드에서 타임라인 핀치 줌/축소 시 배율 토스트가 선명하게 표시되도록 활성화 */
  body.mobile-landscape-mode #timeline-zoom-toast {
    display: block !important;
    position: absolute !important;
    top: auto !important;
    bottom: 142px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(10, 16, 26, 0.96) !important;
    border: 1.5px solid #ffd600 !important;
    color: #ffd600 !important;
    font-size: 11.5px !important;
    font-weight: 900 !important;
    padding: 5px 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.92) !important;
    z-index: 250 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
  }

  /* 완전 투명 배경에서도 모든 텍스트/아이콘이 경기 영상 위에서 또렷하게 보이도록 하드웨어 가속 단일 1px 그림자 적용 (6px 가우시안 블러로 인한 모바일 GPU 잔상 원천 차단) */
  body.mobile-landscape-mode #ml-dock-body .tool-name,
  body.mobile-landscape-mode #ml-dock-body .tool-icon,
  body.mobile-landscape-mode #ml-dock-body .score-player-name,
  body.mobile-landscape-mode #ml-dock-body .score-point-big,
  body.mobile-landscape-mode #ml-dock-body .time-code,
  body.mobile-landscape-mode #ml-dock-body .toggle-title,
  body.mobile-landscape-mode #ml-dock-body .ml-dock-title {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95) !important;
  }

  /* 5. [신규] 가로대화면 편집 오른쪽 투명도 조절 스크롤 슬라이더 바 */
  .ml-opacity-bar {
    display: none;
  }

  body.mobile-landscape-mode .ml-opacity-bar {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(15, 23, 42, 0.72) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    border-radius: 14px !important;
    padding: 3px 8px !important;
    margin: 0 !important;
    user-select: none !important;
    touch-action: none !important;
    flex-shrink: 0 !important;
    min-width: 0;
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  .ml-opacity-label {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    color: #38bdf8 !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px !important;
    text-shadow: 0 1px 3px #000 !important;
    pointer-events: none !important;
  }

  .ml-opacity-slider-box {
    position: relative !important;
    width: 56px !important;
    min-width: 56px !important;
    height: 22px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    touch-action: none !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
  }

  .ml-opacity-slider-track {
    width: 100% !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    position: relative !important;
    pointer-events: none !important;
  }

  .ml-opacity-slider-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #38bdf8, #00e5ff) !important;
    border-radius: 999px !important;
    pointer-events: none !important;
  }

  .ml-opacity-slider-thumb {
    position: absolute !important;
    top: 50% !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.85) !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
  }

  .ml-opacity-range {
    display: none !important;
  }

  .ml-opacity-num {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    color: #fff !important;
    min-width: 26px !important;
    text-align: right !important;
    text-shadow: 0 1px 3px #000 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
  }

  body.mobile-landscape-mode #viewport-box {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
  }

  body.mobile-landscape-mode .canvas-wrapper {
    max-width: 100vw !important;
    max-height: 100vh !important;
    box-shadow: none !important;
    outline: none !important;
  }

  body.mobile-landscape-mode .btn-top-landscape {
    background: #0284c7 !important;
    color: #fff !important;
  }
}

/* ========================================================
       [가상 가로 회전 모드]
       설치된 PWA(WebAPK)가 세로로 고정되어 있거나 OS 자동 회전이 막혀
       실제 화면이 가로로 돌아가지 않을 때, 앱 전체를 CSS로 90도 회전.
       사용자는 폰을 왼쪽(반시계)으로 눕혀 사용한다.
       body에 transform을 주면 body가 fixed 자식들의 기준 박스가 되므로
       도크/영상/토스트/모달이 함께 회전된다.
       ======================================================== */
body.ml-pseudo-rotate {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vh !important;
  height: 100vw !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
  transform-origin: top left !important;
  transform: rotate(90deg) translateY(-100%) !important;
}

body.ml-pseudo-rotate.mobile-landscape-mode #viewport-box {
  width: 100vh !important;
  height: 100vw !important;
}

body.ml-pseudo-rotate.mobile-landscape-mode .canvas-wrapper {
  max-width: 100vh !important;
  max-height: 100vw !important;
}

body.ml-pseudo-rotate .mobile-landscape-dock {
  left: 50vh !important;
  right: 0 !important;
  width: 50vh !important;
  min-width: 50vh !important;
  max-width: 50vh !important;
  height: 100vw !important;
}

/* ========================================================
       [v225] 공식 앱 아이콘(/icon-192.png) 적용 및 '테니스 에디터' 가로 1줄 고정
       ======================================================== */
.home-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

.home-logo-box {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
  white-space: nowrap !important;
}

img.home-app-icon,
.home-app-icon {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  background: #14161c !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(217, 255, 0, 0.25) !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.home-logo-text {
  display: inline-block !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  writing-mode: horizontal-tb !important;
  flex-shrink: 0 !important;
  font-size: clamp(17px, 4.2vw, 23px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px !important;
  line-height: 1.2 !important;
}

.home-brand-subtag {
  white-space: nowrap !important;
  word-break: keep-all !important;
  writing-mode: horizontal-tb !important;
  flex-shrink: 0 !important;
  margin-left: 2px !important;
}

.home-header-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  flex-shrink: 1 !important;
  min-width: 0 !important;
}

.btn-home-about-chip {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.tenniscut-header-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 4px 10px 4px 6px !important;
}

img.tenniscut-brand-icon,
.tenniscut-brand-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
}

#editor-page-title,
.top-app-title {
  white-space: nowrap !important;
  word-break: keep-all !important;
  writing-mode: horizontal-tb !important;
  flex-shrink: 0 !important;
}

@media (max-width: 520px) {

  img.home-app-icon,
  .home-app-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
  }

  .home-logo-box {
    gap: 6px !important;
  }

  .home-logo-text {
    font-size: 16.5px !important;
  }

  .home-brand-subtag {
    font-size: 9.5px !important;
    padding: 2px 5px !important;
  }

  .btn-home-about-chip {
    font-size: 10.5px !important;
    padding: 4px 7px !important;
  }

  .home-header-actions {
    gap: 4px !important;
  }
}

/* ========================================================
       [v226] 카카오톡·네이버·인스타그램 인앱 브라우저 외부 브라우저 전환 배너
       ======================================================== */
.inapp-browser-escape-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 2px solid #ffd600;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.85);
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.4;
}

.inapp-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.inapp-banner-text strong {
  color: #ffd600;
  font-size: 12.5px;
  font-weight: 900;
}

.inapp-banner-text span {
  color: #e2e8f0;
  font-size: 11px;
  word-break: keep-all;
}

.inapp-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-inapp-open-ext {
  background: #ffd600;
  color: #090d16;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(255, 214, 0, 0.35);
}

.btn-inapp-close {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================================
       [v231] 비파괴 AI 서브 시작점 마커 핀 & 원터치 점프 바
       ======================================================== */
.ai-serve-markers-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 35;
}

.ai-serve-marker-pin {
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, #ffd600 0%, rgba(255, 214, 0, 0.55) 75%, rgba(255, 214, 0, 0.15) 100%);
  pointer-events: none;
  z-index: 36;
}

.ai-serve-marker-head {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd600;
  color: #090d16;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 6px rgba(255, 214, 0, 0.65);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.ai-serve-marker-head:hover,
.ai-serve-marker-head:active {
  transform: translateX(-50%) scale(1.14);
  background: #ccff00;
}

.ai-serve-marker-nav {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 16, 26, 0.94);
  border: 1.5px solid rgba(255, 214, 0, 0.65);
  border-radius: 999px;
  padding: 3px 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.78);
  pointer-events: auto;
}

.btn-ai-marker-step {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-ai-marker-step.is-next {
  background: #ffd600;
  border-color: #ffd600;
  color: #090d16;
  font-weight: 900;
}

.btn-ai-marker-step:active {
  transform: scale(0.95);
}

.ai-marker-counter {
  font-size: 10.5px;
  font-weight: 900;
  color: #ffd600;
  padding: 0 4px;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.btn-ai-marker-clear {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  font-size: 10px;
  font-weight: 900;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* 모바일 가로모드에서도 AI 서브 마커 점프 바가 타임라인 위에 선명하게 표시되도록 배치 */
body.mobile-landscape-mode .ai-serve-marker-nav {
  position: absolute !important;
  top: auto !important;
  bottom: 102px !important;
  right: 8px !important;
  z-index: 240 !important;
  padding: 2px 5px !important;
  gap: 3px !important;
}

body.mobile-landscape-mode .btn-ai-marker-step {
  font-size: 10px !important;
  padding: 2.5px 7px !important;
}

/* ========================================================
       [v236] 초반 베스트 랠리 영문 '★ BEST RALLY' 깜박임·반짝임 배지 (점수 스포 방지)
       ======================================================== */
.replay-badge-overlay.is-best-rally-blink {
  top: 16px !important;
  left: 16px !important;
  z-index: 45 !important;
  background: rgba(10, 14, 24, 0.88) !important;
  border: 2px solid #ffd600 !important;
  padding: 7px 16px !important;
  border-radius: 999px !important;
  animation: bestRallyBadgePulse 0.95s ease-in-out infinite !important;
}

.replay-badge-overlay.is-best-rally-blink .replay-pulse-dot {
  background: #ffd600 !important;
  box-shadow: 0 0 12px #ffd600, 0 0 20px #fff176 !important;
  animation: bestRallyDotSparkle 0.95s ease-in-out infinite !important;
}

.replay-badge-overlay.is-best-rally-blink .replay-badge-text {
  color: #ffd600 !important;
  font-family: 'Montserrat', -apple-system, 'Pretendard', sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  animation: bestRallyTextBlink 0.95s ease-in-out infinite !important;
}

@keyframes bestRallyBadgePulse {

  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 214, 0, 0.75), 0 0 30px rgba(255, 214, 0, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.35);
    border-color: #ffe54c;
  }

  50% {
    box-shadow: 0 0 6px rgba(255, 214, 0, 0.25);
    border-color: rgba(255, 214, 0, 0.45);
  }
}

@keyframes bestRallyTextBlink {

  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 214, 0, 0.95), 0 0 20px rgba(255, 241, 118, 0.7);
  }

  50% {
    opacity: 0.32;
    text-shadow: 0 0 2px rgba(255, 214, 0, 0.2);
  }
}

@keyframes bestRallyDotSparkle {

  0%,
  100% {
    opacity: 1;
    transform: scale(1.18);
  }

  50% {
    opacity: 0.28;
    transform: scale(0.75);
  }
}

/* ========================================================
       [v275] 스코어보드 글씨체 스타일 (인트로와 독립 선택)
       - sb-font-intro_upright: 인트로 서체 (기울어지지 않은 정자체 · 900 weight, tight tracking)
       - sb-font-intro_italic: 인트로 서체 (기울임 이탤릭 · italic 900 weight, tight tracking)
       ======================================================== */
.wimbledon-scoreboard.sb-font-intro_upright .ws-player-name,
.wimbledon-scoreboard.sb-font-intro_upright .ws-sets,
.wimbledon-scoreboard.sb-font-intro_upright .ws-cell {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Pretendard', 'Malgun Gothic', sans-serif !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: -0.05em !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92) !important;
}

.wimbledon-scoreboard.sb-font-intro_italic .ws-player-name,
.wimbledon-scoreboard.sb-font-intro_italic .ws-sets,
.wimbledon-scoreboard.sb-font-intro_italic .ws-cell {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Pretendard', 'Malgun Gothic', sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  letter-spacing: -0.05em !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92) !important;
}

.wimbledon-scoreboard.sb-font-intro_italic .ws-player-name {
  padding-right: 3px !important;
}