/* Pinterest Design System Tokens & Base Styles for KTDCA Taekwondo Championship */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;600;700;800;900&family=Gowun+Batang:wght@400;700&display=swap');

:root {
  /* Brand & Accents */
  --primary: #e60023;
  --on-primary: #ffffff;
  --primary-pressed: #cc001f;
  
  /* Monochrome & Chrome */
  --ink: #000000;
  --ink-soft: #211922;
  --body: #33332e;
  --charcoal: #262622;
  --mute: #62625b;
  --ash: #91918c;
  --stone: #c8c8c1;
  --hairline: #dadad3;
  --hairline-soft: #e5e5e0;
  
  --canvas: #ffffff;
  --surface-soft: #fbfbf9;
  --surface-card: #f6f6f3;
  --surface-dark: #262622;
  
  --secondary-bg: #e5e5e0;
  --secondary-pressed: #c8c8c1;
  --on-secondary: #000000;
  --on-dark: #ffffff;
  
  /* Focus & Semantics */
  --focus-outer: #435ee5;
  --focus-inner: #ffffff;
  --success-deep: #103c25;
  --success-pale: #c7f0da;
  --error: #9e0a0a;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xxs: 4px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-section: 64px;
  
  /* Typography */
  --font-display: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Gowun Batang', 'Batang', serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--surface-soft);
  color: var(--body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 700;
}

/* Primary Sticky Header */
.primary-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
}

.nav-inner {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--ink);
}

.brand-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -1px;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--mute);
  font-weight: 500;
}

/* Search Bar (Pinterest Round Style) */
.search-bar-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-bar {
  width: 100%;
  height: 48px;
  background-color: var(--surface-card);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 0 16px 0 44px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus {
  background-color: var(--canvas);
  border-color: var(--ash);
  box-shadow: 0 0 0 2px var(--focus-outer);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.05s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background-color: var(--primary-pressed);
}

.btn-secondary {
  background-color: var(--secondary-bg);
  color: var(--on-secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary-pressed);
}

.btn-pill {
  border-radius: var(--radius-full);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  background-color: var(--surface-card);
  color: var(--ink);
}

.btn-icon:hover {
  background-color: var(--hairline-soft);
}

/* Main Container */
.main-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-section);
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-xl);
  align-items: center;
  background-color: var(--canvas);
  border-radius: var(--radius-lg);
  padding: var(--space-xxl);
  margin-bottom: var(--space-section);
  border: 1px solid var(--hairline-soft);
}

.hero-display-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-card);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.hero-desc {
  font-size: 15px;
  color: var(--mute);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  max-width: 640px;
}

.hero-info-summary-box {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0 20px 0;
  max-width: 640px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.5;
}

.hero-info-header {
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
  margin-bottom: 2px;
}

.hero-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: #1e293b;
}

.hero-info-label {
  flex-shrink: 0;
  min-width: 100px;
  font-weight: 700;
  color: #475569;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-info-val {
  flex: 1;
  color: #1e293b;
  word-break: keep-all;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .hero-info-row {
    flex-direction: column;
    gap: 3px;
  }
  .hero-info-label {
    min-width: unset;
  }
}

.hero-stats-strip {
  display: flex;
  gap: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline-soft);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--mute);
}

/* Hero Card Graphic */
.hero-graphic-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, #1f1f1d, #32322e);
  color: #fff;
  padding: var(--space-xxl);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-graphic-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero-graphic-art {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
}

/* Section Header */
.section-header {
  margin-bottom: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.section-desc {
  font-size: 14px;
  color: var(--mute);
  margin-top: 4px;
}

/* Section Cards Layout */
.section-block {
  margin-bottom: var(--space-section);
  position: relative;
  width: 100%;
  box-sizing: border-box;
  clear: both;
}

/* Team Profile Strip (Pinned Card) */
.team-profile-card {
  background-color: var(--canvas);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  padding: var(--space-xl);
  margin-bottom: var(--space-section);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.form-label span.req {
  color: var(--primary);
  margin-left: 2px;
}

.text-input, .select-input {
  width: 100%;
  height: 44px;
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.text-input:focus, .select-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--focus-outer);
}

.input-hint {
  font-size: 12px;
  color: var(--mute);
}

/* Athlete Section: Layout split with Quick Add & Masonry / List */
.athlete-layout {
  display: block;
  width: 100%;
}

.athlete-form-card {
  background-color: var(--canvas);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  padding: var(--space-xl);
  position: sticky;
  top: 88px;
}

.athlete-form-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Athlete Cards Masonry / Grid */
.athlete-board {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.filter-chip-strip {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  background-color: var(--surface-card);
  color: var(--ink);
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.filter-chip.active {
  background-color: var(--ink);
  color: var(--on-dark);
}

.athlete-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.athlete-card {
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.athlete-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.athlete-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.athlete-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
  border: 1px solid var(--hairline-soft);
}

.athlete-dan-pill {
  background-color: var(--surface-card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.athlete-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
}

.athlete-meta {
  font-size: 13px;
  color: var(--mute);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.athlete-reg-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--body);
  background-color: var(--surface-card);
  padding: 6px 12px;
  border-radius: var(--radius-md);
}

.athlete-actions {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

/* Registration & Skill Matching Section */
.reg-section-card {
  background-color: var(--canvas);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  padding: var(--space-xl);
}

.reg-builder-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: var(--space-xl);
  align-items: stretch;
}

.athlete-selector-box {
  border-right: 1px solid var(--hairline);
  padding-right: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

#athleteSelectorList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 720px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

#athleteSelectorList::-webkit-scrollbar {
  width: 6px;
}
#athleteSelectorList::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}
#athleteSelectorList::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}
#athleteSelectorList::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.athlete-item-selectable {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background-color: var(--surface-card);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.athlete-item-selectable:hover {
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.athlete-item-selectable.selected {
  background-color: #fff9f9;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.12);
}

/* Individual Athlete Selector Filter Bar & Division Grouping */
.ind-athlete-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.ind-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ind-filter-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--mute);
  flex-shrink: 0;
  white-space: nowrap;
}

.ind-gender-toggle-group {
  display: inline-flex;
  background: #ffffff;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  gap: 2px;
}

.btn-ind-gender {
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: all 0.15s ease;
}

.btn-ind-gender:hover:not(.active) {
  color: #0f172a;
  background: #f1f5f9;
}

.btn-ind-gender.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.ind-division-select {
  height: 32px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.ind-division-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 3.5px solid #64748b;
  margin-top: 8px;
  margin-bottom: 2px;
  user-select: none;
}

.ind-division-group-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ind-division-group-count {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

/* Event Category Selection */
.events-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.event-category-tabs {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: var(--space-sm);
}

.event-tab-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--mute);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.event-tab-btn.active {
  color: var(--primary);
  background-color: #fff0f2;
}

/* Free Break Skill Matching (자유격파 기술 매칭 시스템) */
.skills-difficulty-panel {
  background-color: var(--surface-card);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.score-calculator-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--charcoal);
  color: var(--on-dark);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}

.score-banner-left {
  display: flex;
  flex-direction: column;
}

.score-banner-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.score-banner-rule {
  font-size: 12px;
  color: #ff9ca8;
  margin-top: 2px;
}

.score-total-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.score-num {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
}

.score-unit {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* Skills Masonry/Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.skill-card-item {
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.skill-card-item.selected {
  border-color: var(--primary);
  background-color: #fffafa;
}

.skill-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 3px;
}

.skill-info {
  flex: 1;
}

.skill-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.skill-category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mute);
  margin-top: 2px;
}

.skill-desc {
  font-size: 12px;
  color: var(--mute);
  margin-top: 4px;
}

.skill-pts-pill {
  background-color: var(--surface-card);
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Registration Summary & Final Table */
.summary-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--canvas);
  text-align: left;
  font-size: 14px;
}

.summary-table th {
  background-color: var(--surface-card);
  color: var(--ink);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  vertical-align: middle;
}

.summary-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--body);
  vertical-align: middle;
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.tech-tag-pill {
  display: inline-flex;
  align-items: center;
  background-color: var(--surface-card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}

/* Summary Section 5: KPI Dashboard & View Tabs */
.summary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.summary-kpi-card {
  background: var(--canvas);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.summary-kpi-card.highlight {
  background: linear-gradient(135deg, #fffafa 0%, #ffffff 100%);
  border-color: #ffccd3;
}

.summary-kpi-lbl {
  font-size: 13px;
  color: var(--mute);
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-kpi-val {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.summary-kpi-card.highlight .summary-kpi-val {
  color: var(--primary);
}

.summary-kpi-sub {
  font-size: 12px;
  color: var(--mute);
  margin-top: 4px;
}

.summary-nav-tabs {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--hairline-soft);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  white-space: nowrap;
}

.summary-nav-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--mute);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.summary-nav-btn:hover {
  color: var(--ink);
}

.summary-nav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.summary-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
}

.summary-filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--mute);
  cursor: pointer;
  transition: all 0.15s ease;
}

.summary-filter-chip:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.summary-filter-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.fee-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Evaluation & Certificate Preview Section */
.eval-cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.eval-card, .cert-action-card {
  background-color: var(--canvas);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  padding: var(--space-xl);
}

/* Modal Overlay (Pinterest style: 50% scrim + 32px rounded modal + 16px ambient shadow) */
.modal-scrim {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-scrim.open {
  display: flex;
}

.modal-container {
  background-color: var(--canvas);
  border-radius: var(--radius-lg);
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
  padding: var(--space-xxl);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--surface-card);
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Certificate (상장) Layout & Design - A4 Optimized */
.certificate-preview-box {
  background-color: #faf9f5;
  border: 8px double #a37e42;
  border-radius: 4px;
  padding: 40px 48px;
  position: relative;
  font-family: var(--font-serif);
  color: #1a1a18;
  margin: var(--space-lg) 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.cert-inner-border {
  border: 1.5px solid #a37e42;
  padding: 36px 30px;
  position: relative;
}

.cert-header {
  text-align: center;
  margin-bottom: 28px;
}

.cert-number {
  font-size: 13px;
  color: #666;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.cert-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 12px;
  color: #1a1a18;
  margin-bottom: 12px;
}

.cert-award-tier {
  font-size: 26px;
  font-weight: 700;
  color: #a37e42;
  letter-spacing: 4px;
}

.cert-recipient-grid {
  margin: 28px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  row-gap: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.cert-recipient-label {
  font-weight: 700;
  color: #444;
}

.cert-recipient-val {
  color: #111;
  font-weight: 600;
}

.cert-body-text {
  font-size: 18px;
  line-height: 2;
  text-align: justify;
  text-justify: inter-word;
  margin: 32px 0 48px;
  word-break: keep-all;
}

.cert-date {
  text-align: center;
  font-size: 18px;
  margin-bottom: 36px;
  letter-spacing: 2px;
}

.cert-footer-issuer {
  text-align: center;
  position: relative;
  margin-top: 20px;
}

.cert-issuer-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
}

.cert-official-seal {
  position: absolute;
  right: 18%;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  border: 3px solid #b31919;
  color: #b31919;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  border-radius: 8px;
  opacity: 0.85;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background-color: var(--charcoal);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.25s ease-out;
}

.toast.success {
  border-left: 4px solid #28a745;
}

.toast.error {
  border-left: 4px solid var(--primary);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Auth Tabs & Modal Additions */
.auth-tab-bar {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-xl);
}

.auth-tab-btn {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--mute);
  padding: 10px 16px;
  cursor: pointer;
  position: relative;
}

.auth-tab-btn.active {
  color: var(--ink);
}

.auth-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
}

.guest-notice-banner {
  background-color: var(--canvas);
  border: 2px dashed var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-xxl);
  text-align: center;
  margin-bottom: var(--space-section);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.guest-notice-icon {
  font-size: 48px;
}

.guest-notice-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.guest-notice-desc {
  font-size: 15px;
  color: var(--mute);
  max-width: 540px;
  line-height: 1.6;
}

/* Official Registration Receipt (참가 접수 확인서 A4) */
.receipt-preview-box {
  background-color: #ffffff;
  border: 1.5px solid #1f2937;
  padding: 28px 24px;
  font-family: var(--font-body);
  color: #111827;
  margin: var(--space-md) 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  box-sizing: border-box;
}

.receipt-header {
  text-align: center;
  border-bottom: 2px solid #111827;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.receipt-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  word-break: keep-all;
  line-height: 1.35;
  margin: 10px 0 4px 0;
  color: #111827;
}

.receipt-title .receipt-title-main {
  display: block;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-top: 4px;
}

.receipt-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
  word-break: keep-all;
}

.receipt-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  word-break: keep-all;
  line-height: 1.6;
}

.receipt-meta-item strong {
  color: #111827;
  margin-right: 6px;
  white-space: nowrap;
}

.receipt-sheet-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.receipt-roster-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 12px;
  table-layout: fixed;
  word-break: keep-all;
}

.receipt-roster-table th, .receipt-roster-table td {
  border: 1px solid #d1d5db;
  padding: 8px 7px;
  text-align: left;
  vertical-align: middle;
  word-break: keep-all;
  line-height: 1.4;
  box-sizing: border-box;
}

.receipt-roster-table th {
  background-color: #f3f4f6;
  font-weight: 700;
  color: #111827;
  text-align: center;
  white-space: nowrap;
  font-size: 11.5px;
  padding: 9px 6px;
}

.receipt-roster-table td.num-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding: 8px 8px;
}

.receipt-pledge {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 20px;
  word-break: keep-all;
}

.receipt-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 16px;
  border-top: 1px dashed #d1d5db;
  word-break: keep-all;
}

.receipt-official-stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #dc2626;
  color: #dc2626;
  font-weight: 900;
  font-size: 11.5px;
  line-height: 1.35;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  transform: rotate(-6deg);
  background: rgba(220, 38, 38, 0.03);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Individual Event Registration Units (종목 단위 명확 구분 스타일) */
.ind-event-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
}

.ind-selected-ath-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.ind-total-fee-badge {
  display: inline-flex;
  align-items: center;
  background-color: #fff0f2;
  color: var(--primary);
  border: 1px solid #ffd6dc;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.ind-guide-tip {
  font-size: 13.5px;
  color: var(--mute);
  margin: 6px 0 24px 0;
  line-height: 1.5;
}

.ind-event-section-block {
  background-color: var(--canvas);
  margin-bottom: 28px;
}

.ind-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ind-event-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ind-event-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

.ind-event-title-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.ind-event-number-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.ind-event-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}

.ind-event-fee-pill {
  background-color: #f1f1ee;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.ind-event-divider {
  height: 1px;
  background-color: var(--hairline);
  margin: 12px 0 16px 0;
  border: none;
}

.ind-event-desc {
  font-size: 13.5px;
  color: var(--body);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Designated Tech Display */
.designated-empty-box {
  background-color: var(--surface-card);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--mute);
  font-size: 13.5px;
  font-weight: 500;
}

.designated-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.designated-skill-card {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.designated-skill-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.designated-skill-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* Comprehensive Breaking (개인 종합격파) Custom UI */
.comp-rule-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #fff0f2;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.comp-tech-group {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.comp-tech-group.disabled {
  opacity: 0.5;
  background-color: #f7f7f5;
}

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

.comp-tech-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.comp-status-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.comp-status-pill.required {
  background-color: #ffeae8;
  color: var(--primary);
}

.comp-status-pill.excluded {
  background-color: var(--hairline);
  color: var(--mute);
}

.comp-radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.comp-radio-pill {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.comp-radio-pill:hover {
  border-color: var(--ash);
}

.comp-radio-pill.selected {
  border: 1.5px solid var(--primary);
  background-color: #ffffff;
  color: var(--primary);
  font-weight: 700;
}

.comp-radio-pill input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

.ind-submit-bar {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: flex-end;
}

/* Designated Breaking 1, 2, 3 Tech Badges */
.designated-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.designated-tech-box {
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.designated-tech-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.designated-tech-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* Rulebook Modal (대회요강 뷰어) */
.rulebook-tab-bar {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  white-space: nowrap;
}

.rulebook-tab-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--mute);
  padding: 10px 14px;
  cursor: pointer;
}

.rulebook-tab-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* Member Modal Tabs */
.member-tab-bar {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  white-space: nowrap;
}

.member-tab-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--mute);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.member-tab-btn:hover {
  color: var(--ink);
}

.member-tab-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.rulebook-content-pane {
  display: none;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 8px;
  line-height: 1.6;
  font-size: 14px;
}

.rulebook-content-pane.active {
  display: block;
}

.rulebook-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 13px;
}

.rulebook-table th, .rulebook-table td {
  border: 1px solid var(--hairline);
  padding: 8px 10px;
  text-align: left;
}

.rulebook-table th {
  background-color: var(--surface-card);
  font-weight: 700;
}

/* Dedicated Team Events Section */
.team-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: var(--space-xl);
}

.team-event-card {
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.team-event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.team-event-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.team-event-rule-text {
  font-size: 13px;
  color: var(--mute);
  margin-top: 4px;
}

/* Team Event Roster & Limit UI */
.team-roster-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.team-roster-badge.warning {
  background-color: #fff8e1;
  color: #b78103;
  border: 1px solid #ffe082;
}

.team-roster-badge.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.team-roster-badge.danger {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.roster-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
  min-height: 36px;
  align-items: center;
  background-color: var(--canvas);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
}

.roster-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.roster-chip.female {
  border-color: #ff80ab;
  background-color: #fff0f5;
  color: #c2185b;
}

.roster-chip-remove {
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 2px;
  line-height: 1;
}

.roster-chip-remove:hover {
  color: var(--primary);
}

.roster-quick-selector {
  margin-top: 14px;
  background-color: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--hairline);
}

.roster-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.roster-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.roster-checkbox-item.checked {
  border-color: var(--primary);
  background-color: #fffafa;
}

.roster-checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
  .athlete-layout {
    grid-template-columns: 1fr;
  }
  .reg-builder-grid {
    grid-template-columns: 1fr;
  }
  .athlete-selector-box {
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: var(--space-lg);
    padding-right: 0;
    height: auto;
  }
  #athleteSelectorList {
    max-height: 340px;
  }
  .eval-cert-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .primary-nav {
    padding: 0 var(--space-md);
  }
  .search-bar-wrap {
    display: none;
  }
  .hero-title {
    font-size: 32px;
  }
  .main-layout {
    padding: var(--space-md);
  }
  .modal-container {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
  }
  .receipt-preview-box {
    padding: 20px 14px;
  }
}

/* PRINT CSS OPTIMIZATION - A4 Receipt & Certificate Print */
@media print {
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body > *:not(#receiptModal) {
    display: none !important;
  }
  
  #receiptModal {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
    overflow: visible !important;
    z-index: auto !important;
  }
  
  #receiptModal .modal-container {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    height: auto !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  
  .receipt-preview-box {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: 1.5px solid #111 !important;
    padding: 10mm 12mm !important;
    background: #fff !important;
    visibility: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: auto;
  }
  
  .receipt-preview-box * {
    visibility: visible !important;
  }
  
  .receipt-roster-table {
    page-break-inside: auto;
  }
  
  .receipt-roster-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  .receipt-pledge, .receipt-footer {
    page-break-inside: avoid;
  }
  
  .modal-close-btn, .no-print, .modal-scrim-close {
    display: none !important;
  }

  @page {
    size: A4 portrait;
    margin: 8mm;
  }
}

/* 11. Member / Gym Profile Modal Styles */
.member-pane {
  display: none;
  line-height: 1.6;
}

.member-pane.active {
  display: block;
}

/* 12. Coach Teams Grid & Cards */
.coach-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.coach-team-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.coach-team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: #ffd591;
}

.coach-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #fff0f2;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.coach-role-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #f0f7ff;
  color: #0052cc;
  border: 1px solid #cce4ff;
}

.coach-filter-pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.coach-filter-pill:hover {
  background: var(--secondary-bg);
}

.coach-filter-pill.active {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

/* 13. Collapsible Sections (Option A - Smart Summary Accordion with Chevron Toggle) */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Accordion Chevron Toggle Button */
.accordion-chevron-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hairline);
  background: var(--canvas);
  color: var(--charcoal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.accordion-chevron-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.accordion-chevron-btn .chevron-svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg); /* points UP when expanded */
}

.section-block.is-collapsed .accordion-chevron-btn .chevron-svg {
  transform: rotate(180deg); /* points DOWN when collapsed */
}

.section-block.is-collapsed .accordion-chevron-btn {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

/* Dropdown Menu for Secondary Actions */
.more-actions-wrap {
  position: relative;
  display: inline-block;
}

.more-actions-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 210px;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

.more-actions-menu.open {
  display: block;
}

.more-actions-menu .menu-item-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.more-actions-menu .menu-item-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

/* Excel Unified Action Group */
.excel-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 3px 12px 3px 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
}

.btn-link-subtle {
  background: transparent;
  border: none;
  color: var(--mute);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.btn-link-subtle:hover {
  color: var(--ink);
}

.section-collapse-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  animation: fadeIn 0.25s ease;
}

.section-collapse-summary strong {
  color: #14532d;
  font-weight: 800;
}

.collapsible-section-body {
  transition: opacity 0.25s ease;
  opacity: 1;
  overflow: visible;
  width: 100%;
  clear: both;
}

.section-block.is-collapsed .collapsible-section-body {
  display: none !important;
}

.section-block.is-collapsed {
  margin-bottom: var(--space-lg) !important;
  background: #fafbfc;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  transition: all 0.25s ease;
}

.section-block.is-collapsed .section-header {
  margin-bottom: 0 !important;
}

.section-block.is-collapsed .section-desc {
  display: none !important;
}

/* Hide secondary action buttons when section is collapsed for ultimate minimalism */
.section-block.is-collapsed .section-header-actions > *:not(.accordion-chevron-btn) {
  display: none !important;
}

.section-block.is-collapsed .team-profile-card {
  margin-bottom: 0 !important;
}

/* ==========================================================================
   공식 시범경기 기술 난이도표 (Master Difficulty Modal & Routine Sequence)
   ========================================================================== */

.difficulty-modal-container {
  max-width: 1080px !important;
  width: 95% !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

.diff-modal-header {
  padding: 22px 28px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.diff-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-right: 40px;
  margin-bottom: 12px;
}

.diff-context-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.diff-gender-toggle {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
}

.diff-gender-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  color: #64748b;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.diff-gender-btn:hover:not(.active) {
  color: #0f172a;
}

.diff-gender-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(230, 0, 35, 0.3);
}

.diff-rule-notice {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 800;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.diff-search-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0 20px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.diff-search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(230, 0, 35, 0.15);
}

.diff-cat-tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

.diff-cat-tab-bar::-webkit-scrollbar {
  height: 5px;
}
.diff-cat-tab-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.diff-cat-tab-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.diff-cat-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff5f6;
}

.diff-cat-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.diff-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px;
  min-height: 0;
  background: #f8fafc;
}

.diff-cat-section {
  margin-bottom: 24px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.diff-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.diff-cat-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diff-cat-note {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.diff-card {
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  user-select: none;
}

.diff-card:hover:not(.ineligible) {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -4px rgba(230, 0, 35, 0.16);
}

.diff-card.selected {
  border-color: var(--primary) !important;
  background: #fff5f6 !important;
  box-shadow: 0 0 0 2px rgba(230, 0, 35, 0.3) !important;
  transform: translateY(-2px);
}

.diff-card.ineligible {
  opacity: 0.5;
  background: #f8fafc;
  border-style: dashed;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.diff-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.diff-card-cat-tag {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
}

.diff-level-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.diff-level-pill.lvl-A, .diff-level-pill.lvl-B {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.diff-level-pill.lvl-C, .diff-level-pill.lvl-D {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.diff-level-pill.lvl-E, .diff-level-pill.lvl-F {
  background: #fdf4ff;
  color: #7e22ce;
  border: 1px solid #f5d0fe;
}
.diff-level-pill.lvl-G, .diff-level-pill.lvl-H, .diff-level-pill.lvl-I {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.diff-ineligible-tag {
  font-size: 11px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #fca5a5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.diff-eligible-tag {
  font-size: 11px;
  font-weight: 800;
  color: #15803d;
  background: #f0fdf4;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.diff-skill-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
}

.diff-card-desc-preview {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.diff-card-restriction-badge {
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #fecaca;
  margin-top: 4px;
}

.diff-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.diff-selected-preview {
  flex: 1;
  min-width: 300px;
}

.diff-selected-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.diff-desc-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diff-desc-input-wrapper label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.diff-desc-input-wrapper input {
  flex: 1;
  height: 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13.5px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
}

.diff-desc-input-wrapper input:focus {
  background: #ffffff;
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(230, 0, 35, 0.15);
}

/* ==========================================================================
   루틴 시퀀스 빌더 스타일 (개인 종합격파 및 단체전 연계)
   ========================================================================== */

.routine-builder-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.routine-summary-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.routine-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #334155;
  font-weight: 600;
}

.routine-stat-item strong {
  font-size: 16.5px;
  color: var(--primary);
  font-weight: 800;
}

.routine-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-empty-box {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
  background: #fafbfc;
}

.routine-item-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.routine-item-card:hover {
  border-color: #cbd5e1;
  border-left-color: var(--primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.routine-item-card.ineligible {
  border-left-color: #ef4444;
  background: #fffafa;
}

.routine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.routine-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.routine-order-badge {
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.routine-cat-pill {
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.routine-skill-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
}

.routine-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.routine-btn-action {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  font-weight: 700;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.routine-btn-action:hover:not(:disabled) {
  border-color: #0f172a;
  color: #0f172a;
  background: #f8fafc;
  transform: translateY(-1px);
}

.routine-btn-action:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.routine-btn-action.btn-del {
  color: #ef4444;
}

.routine-btn-action.btn-del:hover {
  border-color: #ef4444;
  color: #ffffff;
  background: #ef4444;
}

.routine-desc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.routine-desc-row label {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.routine-desc-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 13px;
  background: #ffffff;
  color: #0f172a;
  transition: all 0.2s ease;
}

.routine-desc-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(230, 0, 35, 0.12);
}

/* ==========================================================================
   팀 기술 패키지 관리기 & 난이도표 다중 선택 트레이 스타일
   ========================================================================== */

/* 1. 추천 패키지 프리셋 툴바 */
.team-preset-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 14px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.preset-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-chip-btn {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preset-chip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff5f6;
  transform: translateY(-1px);
}

/* 2. 팀 패키지 빈 상태 & 요약 배너 */
.team-routine-empty-card {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  background: #fafbfc;
}

.team-routine-summary-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.team-routine-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 3. 팀 Part별 기술 카드 */
.team-part-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.team-part-card:hover {
  border-color: #cbd5e1;
  border-left-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.team-part-card.ineligible {
  border-left-color: #ef4444;
  background: #fffafa;
}

.team-part-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.team-part-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-part-badge {
  background: #1e293b;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: -0.2px;
}

.team-part-skill-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

/* 인라인 난이도 드롭다운 셀렉터 */
.team-level-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 6px;
}

.team-level-selector-wrap label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}

.team-level-select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  outline: none;
}

/* 4. 난이도표 모달 내 다중 선택 패키지 트레이 */
.diff-package-tray {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

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

.diff-package-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.diff-package-chips::-webkit-scrollbar {
  height: 4px;
}
.diff-package-chips::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.diff-package-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.diff-package-chip .chip-del-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
}

.diff-package-chip .chip-del-btn:hover {
  color: #ef4444;
}

.diff-footer-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

/* ==========================================================================
   단체전 요강 실시간 검증 바 & 전용 UI (Pre-flight Validator)
   ========================================================================== */
.gt-rule-validator-bar {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: var(--space-md);
  transition: all 0.2s ease;
}

.gt-val-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.gt-val-chip.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.gt-val-chip.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.gt-val-chip.danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.gt-gym-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.gt-gym-check-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.15s ease;
  user-select: none;
}

.gt-gym-check-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.gt-gym-check-item.checked {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.gt-gym-check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   단체팀 신청 목록 상→하 3단 와이드 레이아웃 (Stacked Wide Sectional Layout)
   ========================================================================== */
.gt-horizontal-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  width: 100% !important;
}

/* 상단 도장 단체전 출전 요약 배너 */
.gt-summary-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg, 16px);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.gt-summary-title {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gt-summary-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
}

.gt-summary-stat-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12.5px;
}

/* 단체팀 상하 순차 카드 */
.gt-stacked-card {
  background: var(--surface-card, #ffffff);
  border: 1.5px solid var(--hairline-soft, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
}

.gt-stacked-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.gt-stacked-card.demo-team {
  border-left: 5px solid #f43f5e;
}

.gt-stacked-card.gym-team {
  border-left: 5px solid #0284c7;
}

/* 1단: 신청 정보 & 팀 정보 헤더 */
.gt-card-header {
  background: #f8fafc;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.gt-card-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gt-card-header-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gt-team-index-badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
}

.gt-team-title-text {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  line-height: 1.35;
}

.gt-card-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.gt-card-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.gt-fee-pill {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary, #e11d48);
  background: #fff5f7;
  padding: 6px 14px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid #ffe4e9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gt-action-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 2단: 참가 선수 명단 (풀 와이드 그리드) */
.gt-card-roster-section {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.gt-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gt-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gt-roster-grid-wide {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.gt-roster-chip-wide {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.gt-roster-chip-wide:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.gt-roster-chip-wide.female {
  background: #fff5f7;
  border-color: #fbcfe8;
  color: #9d174d;
}

.gt-roster-chip-wide.female:hover {
  background: #ffe4e9;
  border-color: #f472b6;
}

/* 3단: 기술 순서표 및 경기 규정 */
.gt-card-routine-section {
  padding: 20px 24px;
  background: #fafcff;
}

.gt-routine-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.gt-routine-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #1e40af;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
}

.gt-routine-node.exceeded-node {
  background: #fef2f2 !important;
  border: 1.5px solid #ef4444 !important;
  color: #991b1b !important;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.15) !important;
}

.gt-card-draft-banner {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.gt-routine-arrow {
  color: #93c5fd;
  font-weight: 800;
  font-size: 14px;
  user-select: none;
}

.gt-spec-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  align-items: center;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 768px) {
  .gt-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .gt-card-header-right {
    width: 100%;
    justify-content: space-between;
  }
  .gt-roster-grid-wide {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .gt-roster-grid-wide {
    grid-template-columns: 1fr;
  }
}

/* Music Upload & Audio Player Component */
.music-upload-card {
  border: 1.5px solid var(--hairline);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.music-upload-card:hover {
  border-color: #cbd5e1;
}

.music-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.music-dropzone:hover, .music-dropzone.drag-over {
  border-color: var(--primary);
  background: #fff5f7;
}

.music-player-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.music-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.music-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hairline);
}

.music-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.1s, background-color 0.15s;
}

.music-play-btn:hover {
  background: var(--primary-pressed);
  transform: scale(1.05);
}

.music-play-btn:active {
  transform: scale(0.95);
}

.music-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-seek-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.music-seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.music-time-display {
  font-size: 12px;
  font-weight: 700;
  color: var(--mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ========================================================
   Section 4 Group Team Card: Dedicated Audio Panel & Inline Player
   ======================================================== */
.gt-card-music-panel {
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.gt-card-music-panel.has-music {
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
  border: 1.5px solid #86efac;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.gt-card-music-panel.has-music.exceeded {
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
  border-color: #fca5a5;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.08);
}

.gt-card-music-panel.no-music {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
}

.gt-music-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.gt-music-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gt-music-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.gt-card-music-panel.has-music.exceeded .gt-music-icon-bubble {
  background: #fee2e2;
  border-color: #fecaca;
}

.gt-music-title-text {
  font-size: 13.5px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gt-music-title-text strong {
  color: #0f172a;
  font-weight: 800;
  font-size: 14px;
}

.gt-music-meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.gt-music-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gt-music-tag.tag-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.gt-music-tag.tag-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.gt-music-tag.tag-size {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.gt-music-tag.tag-cloud {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.gt-music-tag.tag-local {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.gt-music-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 인라인 미리듣기 플레이어 컨트롤 */
.gt-music-player-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.gt-card-play-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.gt-card-play-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
}

.gt-card-play-btn.is-playing {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.gt-card-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

/* 음파 애니메이션 */
.gt-card-wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  padding: 0 2px;
  flex-shrink: 0;
}

.gt-card-wave-bars span {
  width: 3px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  transition: height 0.2s, background-color 0.2s;
}

.gt-card-wave-bars.active span {
  background: #2563eb;
  animation: wave-bar 0.7s infinite alternate ease-in-out;
}

.gt-card-wave-bars.active span:nth-child(1) { animation-delay: 0.1s; }
.gt-card-wave-bars.active span:nth-child(2) { animation-delay: 0.3s; }
.gt-card-wave-bars.active span:nth-child(3) { animation-delay: 0.0s; }
.gt-card-wave-bars.active span:nth-child(4) { animation-delay: 0.4s; }
.gt-card-wave-bars.active span:nth-child(5) { animation-delay: 0.2s; }

@keyframes wave-bar {
  0% { height: 4px; }
  100% { height: 16px; }
}

.gt-card-seek-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.gt-card-seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.gt-card-time-display {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 음원 미등록 배너 */
.gt-music-empty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.gt-music-empty-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gt-music-empty-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ========================================================
   국기원 품·단증 공인 인증 카드 & 썸네일 미리보기
   ======================================================== */
.dan-cert-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.dan-cert-card:hover {
  border-color: #cbd5e1;
}

.dan-cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}

.dan-cert-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dan-cert-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.dan-cert-sub {
  font-size: 11px;
  color: var(--mute);
  display: block;
  margin-top: 1px;
}

.dan-cert-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dan-cert-badge.verified {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.dan-cert-badge.unverified {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.dan-cert-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dan-cert-dropzone:hover, .dan-cert-dropzone.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}

.dan-cert-drop-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.dan-cert-drop-text {
  font-size: 13px;
  color: #1e293b;
}

.dan-cert-drop-hint {
  font-size: 11px;
  color: var(--mute);
}

.dan-cert-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

.dan-cert-thumb-wrap {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #f1f5f9;
}

.dan-cert-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.dan-cert-thumb-wrap:hover .dan-cert-thumb {
  transform: scale(1.08);
}

.dan-cert-thumb-zoom {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.2;
}

.dan-cert-info {
  flex: 1;
  min-width: 0;
}

.dan-cert-filename {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dan-cert-filesize {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  margin-top: 2px;
  margin-bottom: 6px;
}

.dan-cert-actions {
  display: flex;
  gap: 4px;
}

/* 선수 카드 단증 인증 영역 및 뱃지 */
.athlete-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.athlete-dan-pill.has-cert {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.athlete-dan-pill.has-cert:hover {
  background: #d1fae5;
  transform: scale(1.04);
}

.dan-cert-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.2;
}

.dan-cert-status-badge.registered {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.12);
}

.dan-cert-status-badge.registered:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.22);
}

.dan-cert-status-badge.unregistered {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}

.dan-cert-status-badge.unregistered:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  transform: translateY(-1px);
}

.cert-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dan-cert-status-badge.registered .cert-status-dot {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.dan-cert-status-badge.unregistered .cert-status-dot {
  background-color: #f43f5e;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.2);
}

.cert-zoom-icon {
  font-size: 10px;
  opacity: 0.85;
  margin-left: 1px;
}

/* 선수 카드 메타 정보 내 단증 상태 행 */
.athlete-cert-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  margin-top: 4px;
  transition: all 0.15s ease;
}

.athlete-cert-row.registered {
  background: #f0fdf4;
  border: 1px dashed #bbf7d0;
}

.athlete-cert-row.unregistered {
  background: #fff8f8;
  border: 1px dashed #fed7aa;
}

.cert-row-label {
  color: var(--mute);
  font-size: 11.5px;
  white-space: nowrap;
}

.cert-row-val {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cert-row-val.success strong {
  color: #059669;
}

.cert-row-val.danger strong {
  color: #e11d48;
}

.cert-no-text {
  font-size: 11px;
  color: #475569;
}

.cert-preview-btn,
.cert-upload-btn {
  font-size: 10.5px !important;
  padding: 1px 8px !important;
  height: 22px !important;
  border-radius: 9999px !important;
  margin-left: auto;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
}

.cert-preview-btn {
  background: #ffffff !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

.cert-preview-btn:hover {
  background: #ecfdf5 !important;
  border-color: #34d399 !important;
}

.cert-upload-btn {
  background: #ffffff !important;
  border: 1px solid #fecdd3 !important;
  color: #e11d48 !important;
}

.cert-upload-btn:hover {
  background: #fff1f2 !important;
  border-color: #fb7185 !important;
}

/* ==========================================================================
   단체전 팀 격파 기술 순서표 6-Slot Grid & 심사 채점표 서식 스타일
   ========================================================================== */
.team-routine-summary-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.routine-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.routine-stat-item strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.team-routine-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

@media (max-width: 768px) {
  .team-routine-slots-grid {
    grid-template-columns: 1fr;
  }
}

.team-slot-card {
  position: relative;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 126px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.team-slot-card.filled {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.team-slot-card.filled:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.team-slot-card.empty {
  background: #fafaf9;
  border: 2px dashed #cbd5e1;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.team-slot-card.empty:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.team-slot-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: -0.2px;
}

.team-slot-badge.filled {
  background: #2563eb;
  color: #ffffff;
}

.team-slot-badge.empty {
  background: #e2e8f0;
  color: #64748b;
}

.team-slot-athlete-select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.15s ease;
}

.team-slot-athlete-select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.routine-desc-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  background: #ffffff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease;
}

.routine-desc-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.routine-desc-input::placeholder {
  color: #94a3b8;
  font-size: 11.5px;
}

/* ========================================================================== */
/* 2026 KTDCA 공식 참가신청 시스템 모바일 반응형 전면 최적화 (Mobile Responsive) */
/* ========================================================================== */

@media (max-width: 768px) {
  /* 1. 글로벌 모바일 레이아웃 & 폼 터치 최적화 */
  :root {
    --space-xl: 16px;
    --space-lg: 14px;
    --space-md: 10px;
  }

  body {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
  }

  /* iOS Auto-Zoom 방지 (16px 이하 인풋 터치 시 화면 자동 확대 방지) */
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* 메인 컨테이너 패딩 최적화 */
  .main-layout {
    padding: 10px 12px 32px !important;
  }

  .section-block {
    padding: 16px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
  }

  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .section-header-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 네비게이션 헤더 모바일 최적화 */
  .primary-nav {
    height: auto !important;
    min-height: 56px !important;
    padding: 8px 12px !important;
  }

  .nav-content {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .brand-group {
    flex: 1 1 auto !important;
  }

  .brand-logo-text {
    font-size: 14px !important;
  }

  .header-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .hero-section {
    padding: 18px 14px !important;
  }

  .hero-title {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }

  .hero-stats-strip {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  /* 2. 폼 그리드 모바일 단일 컬럼 전환 */
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .auth-form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* 3. 2번 섹션: 선수단 명부 관리 모바일 최적화 */
  .filter-chip-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .athlete-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .athlete-card {
    padding: 14px !important;
  }

  .excel-actions-group {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 4. 3번 섹션: 개인전 종목 및 순서 구성 모바일 최적화 */
  .reg-builder-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .athlete-selector-box {
    border-right: none !important;
    border-bottom: 1.5px solid var(--hairline) !important;
    padding-right: 0 !important;
    padding-bottom: 14px !important;
  }

  #athleteSelectorList {
    max-height: 220px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .ind-event-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .ind-total-fee-badge {
    width: 100% !important;
    text-align: center !important;
  }

  /* 개인 종합격파 루틴 카드 모바일 */
  .routine-summary-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  .routine-summary-banner > div:last-child {
    width: 100% !important;
    justify-content: stretch !important;
  }

  .routine-summary-banner button {
    width: 100% !important;
    justify-content: center !important;
  }

  .routine-item-card {
    padding: 12px 14px !important;
  }

  .routine-card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .routine-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .routine-actions-group {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 8px !important;
    margin-top: 4px !important;
  }

  .routine-actions-group .btn {
    flex: 1 !important;
    justify-content: center !important;
    margin-left: 8px !important;
  }

  .routine-btn-action {
    width: 38px !important;
    height: 38px !important;
    font-size: 15px !important;
  }

  .routine-desc-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  /* 모바일 하단 플로팅 저장 바 */
  .ind-submit-bar {
    position: sticky !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
    z-index: 40 !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    margin-bottom: -16px !important;
    flex-direction: column !important;
  }

  .ind-submit-bar button {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
    font-size: 15px !important;
  }

  /* 5. 4번 섹션: 단체전 신청 모바일 최적화 */
  .gt-horizontal-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .gt-part-card {
    padding: 12px 14px !important;
  }

  .gt-part-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .designated-sub-skill-card {
    padding: 10px 12px !important;
  }

  .designated-sub-skill-card .sub-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* 단체팀 생성 모달 라디오 카드 1열 전환 */
  #groupTeamBuilderModal .modal-container [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 6. 모달 팝업 모바일 전체화면/바텀시트 최적화 */
  .modal-container {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: auto 0 0 !important;
    padding: 18px 16px !important;
  }

  .modal-close-btn {
    top: 12px !important;
    right: 12px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
  }

  /* 공식 난이도표 모달 전체화면 전환 */
  .difficulty-modal-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  .diff-modal-header {
    padding: 14px 16px 12px !important;
  }

  .diff-header-top {
    padding-right: 36px !important;
    margin-bottom: 8px !important;
  }

  .diff-header-top h3 {
    font-size: 16px !important;
  }

  .diff-context-bar {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .diff-cat-tab-bar {
    padding: 8px 12px !important;
  }

  .diff-cat-tab-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  .diff-content-scroll {
    padding: 14px 12px !important;
  }

  .diff-skills-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .diff-skill-card {
    padding: 10px 12px !important;
  }

  /* 7. 5번 섹션: 현황 대시보드 & 인쇄 뷰 모바일 최적화 */
  .summary-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .summary-nav-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }

  .summary-nav-btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }

  .summary-table-wrap,
  .receipt-preview-box,
  .judge-sheet-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  .summary-table-wrap table,
  .receipt-table-content {
    min-width: 580px;
  }
}

/* 초소형 모바일 기기 (max-width: 420px) 특화 */
@media (max-width: 420px) {
  .hero-title {
    font-size: 21px !important;
  }

  .routine-header-left {
    font-size: 13px !important;
  }

  .diff-gender-btn {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
  }
}

/* ==============================================================================
   선수단 명부 참가부별 구분 묶어보기 & 필터 바 스타일
   ============================================================================== */
.division-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.division-filter-bar::-webkit-scrollbar {
  height: 4px;
}
.division-filter-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.division-filter-chip {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
  user-select: none;
  flex-shrink: 0;
}

.division-filter-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.division-filter-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
}

.division-filter-chip .chip-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 800;
}

.division-filter-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.division-filter-chip.empty-div {
  opacity: 0.65;
  border-style: dashed;
}

.division-filter-chip.empty-div:hover {
  opacity: 1;
}

.athlete-cards-grouped-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  clear: both;
}

.athlete-division-block {
  background: var(--canvas);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025);
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  box-sizing: border-box;
  clear: both;
}

.athlete-division-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.athlete-division-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid #f1f5f9;
}

.athlete-division-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.athlete-division-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.athlete-division-name {
  margin: 0;
  font-size: 17.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.athlete-division-desc {
  font-size: 12.5px;
  color: var(--mute);
  margin-top: 3px;
}

.athlete-division-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.athlete-div-tag {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.athlete-div-tag:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.view-mode-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  gap: 2px;
}

.view-mode-toggle .btn-view-mode {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.view-mode-toggle .btn-view-mode.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.view-mode-toggle .btn-view-mode:hover:not(.active) {
  color: #0f172a;
}




