/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Light Mode (기본) ===== */
:root {
  --primary: #31529f;
  --primary-hover: #273f7d;
  --primary-light: rgba(49, 82, 159, 0.1);
  --primary-border: rgba(49, 82, 159, 0.4);
  --primary-shadow: rgba(49, 82, 159, 0.4);
  --gold: #C9A84C;

  --bg: #F5F5F0;
  --bg-card: #FFFFFF;
  --bg-section-alt: #eeeee9;
  --bg-dark-section: #1a2340;
  --bg-header: rgba(26, 35, 64, 0.95);
  --bg-input: rgba(255, 255, 255, 0.08);

  --text: #333333;
  --text-light: #666666;
  --text-muted: #888888;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.7);

  --border: #e0e0e0;
  --border-light: #f0f0f0;

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --bg: #0D0D0D;
  --bg-card: #1A1A1A;
  --bg-section-alt: #141414;
  --bg-dark-section: #0a0f1a;
  --bg-header: rgba(13, 13, 13, 0.95);

  --text: #E0E0E0;
  --text-light: #AAAAAA;
  --text-muted: #777777;

  --border: #2a2a2a;
  --border-light: #222222;

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul { list-style: none; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: 'Bebas Neue', 'Pretendard', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  transition: background var(--transition);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--text-on-dark);
  letter-spacing: 0.05em;
}

.nav-logo span {
  color: var(--primary);
}

.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text-on-dark);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-blog-link {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}

.nav-badge {
  background: #e63946;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  animation: nav-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes nav-badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
}

.nav-cta {
  background: var(--primary) !important;
  color: var(--text-on-dark) !important;
  padding: 10px 24px !important;
  border-radius: 4px;
  font-weight: 600 !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: var(--primary-hover) !important;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-on-dark);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Language Toggle */
.lang-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-on-dark) !important;
  height: 38px;
  padding: 0 14px !important;
  border-radius: 19px;
  cursor: pointer;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.lang-toggle::after { display: none !important; }

.lang-toggle:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 968px) {
  .lang-toggle {
    align-self: flex-start;
    margin-top: 10px;
  }
}

/* Language Toggle (mobile, next to hamburger) */
.lang-toggle-mobile {
  display: none;
}

@media (max-width: 968px) {
  .lang-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 14px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: var(--text-on-dark);
    font-size: 0.75rem;
    font-weight: 700;
  }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-on-dark);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-overlay.show {
  display: block;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-on-dark);
  background: var(--bg-dark-section);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.3) saturate(0.6);
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.15); }
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 41, 0.5) 0%,
    rgba(15, 23, 41, 0.2) 40%,
    rgba(15, 23, 41, 0.4) 70%,
    rgba(15, 23, 41, 0.95) 100%
  );
}

.hero-bg-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

/* Hero Animations */
.hero-title-anim {
  animation: fadeSlideUp 1s ease-out 0.3s both;
}

.hero-desc-anim {
  animation: fadeSlideUp 1s ease-out 0.6s both;
}

.hero-btn-anim {
  animation: fadeSlideUp 1s ease-out 0.9s both;
}

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

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: fadeSlideUp 1s ease-out 1.2s both;
}

.hero-scroll span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.hero-scroll span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 20px; }
}

.btn-lg {
  padding: 18px 44px;
  font-size: 1.1rem;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: #6b8fd4;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero h1 em {
  font-style: normal;
  color: #6b8fd4;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero social links */
.hero-social {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 28px;
}

.hero-social a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.hero-social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all var(--transition);
  position: relative;
}

.hero-social-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.hero-social-icon-text {
  font-weight: 800;
  font-size: 1.1rem;
  font-family: Georgia, 'Times New Roman', serif;
}

.hero-social-badge {
  position: absolute;
  bottom: -3px;
  right: -6px;
  background: var(--gold);
  color: #1a1200;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.hero-social-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.hero-social a:hover .hero-social-icon {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.hero-social a:hover .hero-social-label {
  color: #fff;
}

@media (max-width: 768px) {
  .hero-social { margin-top: 22px; gap: 14px; }
  .hero-social-icon { width: 38px; height: 38px; }
  .hero-social-icon svg { width: 17px; height: 17px; }
  .hero-social-label { font-size: 0.64rem; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-shadow);
}

.btn-outline {
  background: transparent;
  color: var(--text-on-dark);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.05);
}

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

.btn-dark:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ===== Stats Section ===== */
.stats {
  background: var(--bg-dark-section);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: #6b8fd4;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
}

.stat-number-sm {
  font-size: 2.3rem;
}

.stat-sub {
  color: var(--text-on-dark-muted);
  opacity: 0.65;
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ===== Section Padding ===== */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-dark-section);
  color: var(--text-on-dark);
}

.section-dark .section-title,
.section-title-dark {
  color: var(--text-on-dark);
}

.section-dark .section-subtitle,
.section-subtitle-dark {
  color: var(--text-on-dark-muted);
}

.section-gray {
  background: var(--bg-section-alt);
}

/* ===== Classes Cards ===== */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.classes-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 840px;
  margin: 0 auto;
}

.class-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border-light);
}

.class-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.class-card-img {
  height: 220px;
  background: var(--bg-dark-section);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.class-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.class-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
  text-transform: uppercase;
}

.class-card-body {
  padding: 28px;
}

.class-card-body h3 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.class-card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.class-card-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin: -8px 0 18px;
}

.class-card-body ul {
  margin-bottom: 20px;
}

.class-card-body ul li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-light);
  padding-left: 16px;
  position: relative;
}

.class-card-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateY(-50%);
}

/* ===== Instructor Section ===== */
.instructor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.instructor-img {
  width: 100%;
  height: 500px;
  background: var(--bg-dark-section);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.instructor-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.6), transparent);
}

.instructor-info h2 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.instructor-info .instructor-title {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.instructor-info p {
  margin-bottom: 24px;
  color: var(--text-light);
}

.achievements {
  margin-bottom: 30px;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.achievement-year {
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.achievement-text {
  font-size: 0.95rem;
  color: var(--text);
}

.achievement-text strong {
  color: var(--text);
}

/* ===== Philosophy Section ===== */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.philosophy-card {
  text-align: center;
  padding: 40px 30px;
  background: rgba(49, 82, 159, 0.08);
  border: 1px solid rgba(49, 82, 159, 0.15);
  border-radius: 8px;
  transition: transform var(--transition);
}

[data-theme="dark"] .philosophy-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.philosophy-card:hover {
  transform: translateY(-4px);
}

.philosophy-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.philosophy-card h3 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-on-dark);
}

.philosophy-card p {
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
}

/* ===== Card News Carousel ===== */
.cardnews-carousel {
  position: relative;
}

.cardnews-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(13, 20, 40, 0.7);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 5;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.cardnews-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.cardnews-arrow-prev { left: -8px; }
.cardnews-arrow-next { right: -8px; }

@media (min-width: 769px) {
  .cardnews-arrow { display: flex; }
}

.cardnews-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.cardnews-scroll::-webkit-scrollbar {
  height: 6px;
}

.cardnews-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

.cardnews-item {
  flex: 0 0 auto;
  width: 260px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cardnews-item:hover {
  transform: translateY(-6px);
}

.cardnews-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cardnews-hint {
  text-align: center;
  color: var(--text-on-dark-muted);
  font-size: 0.82rem;
  margin-top: -8px;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .cardnews-item { width: 68vw; }
}

.cardnews-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: zoom-out;
}

.cardnews-lightbox.show {
  display: flex;
}

.cardnews-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.cardnews-lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

/* ===== Marquee Gallery ===== */
.marquee-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 30px 0 10px;
}

.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.marquee-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  width: 190px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.marquee-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .marquee-item { width: 220px; }
  .marquee-wrap::before, .marquee-wrap::after { width: 40px; }
}

/* ===== Schedule Table ===== */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.schedule-table thead {
  background: var(--primary);
  color: var(--text-on-dark);
}

.schedule-table th,
.schedule-table td {
  padding: 16px 20px;
  text-align: center;
  font-size: 0.95rem;
}

.schedule-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.schedule-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.schedule-table tbody tr:hover {
  background: var(--primary-light);
}

.schedule-table .class-adult {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.85rem;
}

.schedule-table .class-kids {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.85rem;
  word-break: keep-all;
  line-height: 1.4;
}

.schedule-table .class-sparring {
  background: rgba(200, 80, 80, 0.12);
  color: #c05050;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.85rem;
  word-break: keep-all;
  line-height: 1.4;
}

.schedule-table .class-open {
  background: rgba(100, 200, 100, 0.15);
  color: #3a9a3a;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.85rem;
  word-break: keep-all;
  line-height: 1.4;
}

.schedule-notes {
  margin-top: 40px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.schedule-notes > p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  line-height: 1.7;
}

.schedule-notes ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.schedule-notes ul li {
  font-size: 0.92rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.6;
}

.schedule-notes ul li:last-child {
  border-bottom: none;
}

.schedule-notes ul li span {
  flex-shrink: 0;
  min-width: 90px;
  text-align: center;
}

/* ===== Trial Form ===== */
.trial-section {
  background: linear-gradient(135deg, #0f1729 0%, #1a2340 100%);
  color: var(--text-on-dark);
}

.trial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.trial-info h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.trial-info p {
  color: var(--text-on-dark-muted);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.trial-benefits {
  margin-bottom: 30px;
}

.trial-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.trial-benefit-icon {
  width: 36px;
  height: 36px;
  background: rgba(49, 82, 159, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.trial-benefit span {
  color: rgba(255, 255, 255, 0.85);
}

.trial-form {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 40px;
}

.trial-form h3 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.8);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--text-on-dark);
  font-family: 'Pretendard', sans-serif;
  font-size: 16px; /* iOS zoom 방지 */
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group select option {
  background: #0f1729;
  color: var(--text-on-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: var(--text-on-dark);
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Pretendard', sans-serif;
  -webkit-appearance: none;
}

.form-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-shadow);
}

/* ===== Contact Buttons (Kakao / Instagram / Phone) ===== */
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.contact-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-btn-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.contact-btn-sub {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.75;
}

.contact-btn-kakao {
  background: #FEE500;
  color: #191919;
}

.contact-btn-kakao .contact-btn-icon { background: rgba(25, 25, 25, 0.08); }

.contact-btn-instagram {
  background: linear-gradient(45deg, #f9ce34, #ee2a7b 45%, #6228d7);
  color: #fff;
}

.contact-btn-instagram .contact-btn-icon { background: rgba(255, 255, 255, 0.25); }

.contact-btn-phone {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-on-dark);
}

.contact-btn-phone .contact-btn-icon { background: rgba(255, 255, 255, 0.1); }

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gallery-item {
  aspect-ratio: 1;
  background: var(--bg-dark-section);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  transition: opacity var(--transition);
}

.gallery-item:hover {
  opacity: 0.85;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.blog-card-img {
  aspect-ratio: 1/1;
  background: var(--bg-dark-section);
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px;
}

.blog-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.blog-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.blog-detail {
  max-width: 760px;
}

.blog-detail-img {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}

.blog-detail-img img {
  width: 100%;
  display: block;
}

.blog-detail-content {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 40px;
  text-align: center;
}

.blog-detail-content ul,
.blog-detail-content ol {
  text-align: left;
  display: inline-block;
}

.blog-detail-content img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin: 24px auto;
}

.blog-detail-back {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ===== Location / Map ===== */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-dark-section);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.location-details {
  padding: 20px 0;
}

.location-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.location-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.location-item h4 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text);
}

.location-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== IBJJF ===== */

/* Tournament grid */
.ibjjf-tournament-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.ibjjf-tournament-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; text-decoration: none; color: var(--text); transition: var(--transition);
  display: block; position: relative; overflow: hidden;
}
.ibjjf-tournament-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ibjjf-tournament-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.ibjjf-tournament-badge {
  display: inline-block; background: var(--primary); color: #fff; font-size: 0.65rem;
  font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 1px; margin-bottom: 10px;
}
.ibjjf-tournament-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 12px; }
.ibjjf-tournament-arrow {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--text-muted); transition: var(--transition);
}
.ibjjf-tournament-card:hover .ibjjf-tournament-arrow { color: var(--primary); }

/* Filters */
.ibjjf-filters { margin-bottom: 24px; }
.ibjjf-filter-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ibjjf-filter-btn {
  padding: 6px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 500;
  text-decoration: none; color: var(--text-muted); background: var(--bg-card);
  border: 1px solid var(--border); transition: var(--transition);
}
.ibjjf-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.ibjjf-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ibjjf-belt-btn { border-left: 3px solid var(--belt-color, #888); }
.ibjjf-belt-btn.active { border-left-color: #fff; }

/* Division grid */
.ibjjf-division-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.ibjjf-division-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; text-decoration: none; color: var(--text); transition: var(--transition);
  display: block;
}
.ibjjf-division-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ibjjf-division-belt { height: 4px; }
.ibjjf-division-body { padding: 16px; }
.ibjjf-division-age { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.ibjjf-division-body h3 {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.05rem; letter-spacing: 1px; margin-bottom: 8px;
}
.ibjjf-division-status {
  display: inline-block; font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
  background: var(--bg-section-alt); color: var(--text-muted);
}
.ibjjf-division-status.ready { background: rgba(42,110,63,0.1); color: #2a6e3f; }

/* Bracket meta */
.ibjjf-bracket-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 12px; font-size: 0.85rem; color: var(--text-muted);
}
.ibjjf-belt-tag {
  display: inline-block; padding: 3px 12px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px;
}

/* Empty state */
.ibjjf-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 768px) {
  .ibjjf-tournament-grid { grid-template-columns: 1fr; }
  .ibjjf-division-grid { grid-template-columns: 1fr 1fr; }
  .ibjjf-filter-btn { padding: 5px 12px; font-size: 0.78rem; }
}
@media (max-width: 480px) {
  .ibjjf-division-grid { grid-template-columns: 1fr; }
}

/* ===== Auth (Login/Register) ===== */
.auth-wrap {
  max-width: 440px; margin: 0 auto; background: var(--bg-card);
  border-radius: 16px; padding: 40px 36px; box-shadow: var(--shadow);
}
.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; border-bottom: 2px solid var(--border); }
.auth-tab {
  flex: 1; padding: 12px; background: none; border: none; font-size: 1rem;
  font-weight: 600; color: var(--text-muted); cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-tab:hover { color: var(--text); }
.auth-field { margin-bottom: 20px; }
.auth-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.auth-field input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; color: var(--text); background: var(--bg); outline: none; transition: var(--transition);
}
.auth-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.auth-btn { width: 100%; padding: 14px; font-size: 1rem; margin-top: 8px; }
.auth-msg { font-size: 0.85rem; padding: 0; margin-bottom: 8px; min-height: 20px; text-align: center; }
.auth-msg.error { color: #e74c3c; }
.auth-msg.success { color: #2a6e3f; }
.nav-auth { display: inline-flex; align-items: center; gap: 10px; }
.nav-auth-name { font-size: 0.9rem; color: rgba(255,255,255,0.8); font-weight: 500; white-space: nowrap; }
.nav-auth-btn { font-size: 0.9rem; color: rgba(255,255,255,0.8); text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.nav-auth-btn:hover { color: #fff; }
@media (max-width: 768px) {
  .auth-wrap { padding: 28px 20px; margin: 0 8px; }
}

/* ===== Tracker ===== */

/* Toast */
.trk-toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: #333; color: #fff; padding: 14px 28px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; z-index: 99999; opacity: 0; transition: all 0.3s ease;
  pointer-events: none; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.trk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.trk-toast--error { background: #e74c3c; }
[data-theme="dark"] .trk-toast { background: #444; }

/* Tabs */
.trk-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.trk-tab {
  padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted); font-size: 0.85rem;
  font-weight: 500; cursor: pointer; transition: var(--transition);
}
.trk-tab:hover { border-color: var(--primary); color: var(--primary); }
.trk-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Toolbar */
.trk-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.trk-count { font-size: 0.85rem; color: var(--text-muted); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* List */
.trk-list { display: flex; flex-direction: column; gap: 8px; }
.trk-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; transition: var(--transition);
}
.trk-item:hover { box-shadow: var(--shadow); }
.trk-item-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.trk-cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.trk-item-name { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.trk-item-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.trk-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.trk-btn-icon {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  transition: var(--transition);
}
.trk-btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.trk-btn-del:hover { border-color: #e74c3c; color: #e74c3c; }
.trk-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 0.95rem; }

/* Modal */
.trk-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 10000; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.trk-modal.show { display: flex; }
.trk-modal-box {
  background: var(--bg-card); border-radius: 16px; padding: 32px;
  max-width: 480px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 90vh; overflow-y: auto;
}
.trk-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.trk-modal-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.trk-modal-close {
  width: 32px; height: 32px; border: none; background: none; font-size: 1.4rem;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.trk-modal-close:hover { color: var(--text); }

/* Form fields */
.trk-field { margin-bottom: 18px; }
.trk-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.trk-field input,
.trk-field select,
.trk-field textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.9rem; color: var(--text); background: var(--bg); outline: none;
  transition: var(--transition); font-family: inherit;
}
.trk-field input:focus,
.trk-field select:focus,
.trk-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.trk-field textarea { min-height: 80px; resize: vertical; }

/* D-day widget */
.trk-dday {
  background: var(--bg-dark-section); color: #fff; border-radius: 12px;
  padding: 20px 24px; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.trk-dday-label { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.trk-dday-name { font-size: 1.1rem; font-weight: 700; margin-top: 4px; }
.trk-dday-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; letter-spacing: 2px;
  color: var(--gold);
}

/* Schedule card */
.trk-schedule-group { margin-bottom: 24px; }
.trk-schedule-slot {
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.trk-schedule-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 8px; transition: var(--transition);
}
.trk-schedule-card.completed { opacity: 0.5; }
.trk-schedule-card.completed .trk-schedule-name { text-decoration: line-through; }
.trk-check {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--transition); color: transparent; font-size: 0.8rem;
}
.trk-check.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.trk-schedule-info { flex: 1; min-width: 0; }
.trk-schedule-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.trk-schedule-detail { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.trk-schedule-arrow { color: var(--text-muted); font-size: 1.1rem; }

/* Quick nav */
.trk-quick-nav {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px; margin-top: 32px;
}
.trk-quick-btn {
  display: block; text-align: center; padding: 14px 8px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px; text-decoration: none;
  color: var(--text); font-size: 0.85rem; font-weight: 500; transition: var(--transition);
}
.trk-quick-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Calendar */
.trk-cal { margin-bottom: 24px; }
.trk-cal-header { display: flex; justify-content: center; align-items: center; gap: 24px; margin-bottom: 16px; }
.trk-cal-header button {
  background: none; border: none; font-size: 1.2rem; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px;
}
.trk-cal-header button:hover { color: var(--primary); }
.trk-cal-header span { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.trk-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center;
}
.trk-cal-day { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; padding: 6px 0; }
.trk-cal-cell {
  padding: 8px 4px; border-radius: 8px; font-size: 0.85rem; cursor: pointer;
  color: var(--text); transition: var(--transition);
}
.trk-cal-cell:hover { background: var(--primary-light); }
.trk-cal-cell.today { font-weight: 700; color: var(--primary); }
.trk-cal-cell.has-schedule { background: var(--primary-light); font-weight: 600; }
.trk-cal-cell.selected { background: var(--primary); color: #fff; }
.trk-cal-cell.other { color: var(--text-muted); opacity: 0.4; }

/* KPI table */
.trk-kpi-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.trk-kpi-table th {
  background: var(--bg-section-alt); padding: 10px 12px; text-align: left;
  font-weight: 600; color: var(--text-muted); font-size: 0.78rem; border-bottom: 2px solid var(--border);
}
.trk-kpi-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-light); color: var(--text);
}
.trk-kpi-table tr:hover td { background: var(--primary-light); }
.trk-kpi-up { color: #2a6e3f; font-weight: 600; }
.trk-kpi-down { color: #e74c3c; font-weight: 600; }
.trk-kpi-target { font-size: 0.75rem; color: var(--text-muted); }

/* Log input */
.trk-log-prev {
  background: var(--bg-section-alt); border-radius: 10px; padding: 16px;
  margin-bottom: 20px; font-size: 0.85rem;
}
.trk-log-prev-title { font-weight: 700; color: var(--text-muted); margin-bottom: 8px; font-size: 0.78rem; }
.trk-log-set-row {
  display: grid; grid-template-columns: 50px 1fr 1fr; gap: 8px;
  align-items: center; margin-bottom: 8px;
}
.trk-log-set-label { font-weight: 700; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.trk-log-set-row input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.9rem; color: var(--text); background: var(--bg); text-align: center;
}
.trk-log-set-row input:focus { border-color: var(--primary); outline: none; }

/* JSON bulk */
.trk-json-area {
  width: 100%; min-height: 200px; padding: 14px; border: 1px solid var(--border);
  border-radius: 8px; font-family: monospace; font-size: 0.8rem; color: var(--text);
  background: var(--bg); resize: vertical;
}
.trk-json-result { margin-top: 12px; font-size: 0.85rem; }
.trk-json-result .ok { color: #2a6e3f; }
.trk-json-result .err { color: #e74c3c; }

/* Exercise block (inline sets) */
.trk-exercise-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 12px; transition: var(--transition);
}
.trk-exercise-block:hover { box-shadow: var(--shadow); }
.trk-exercise-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
}
.trk-set-list { display: flex; flex-direction: column; gap: 6px; }
.trk-set-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.trk-set-row:last-child { border-bottom: none; }
.trk-set-row.done { opacity: 0.5; }
.trk-set-check {
  width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--border);
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--transition); color: transparent; font-size: 0.8rem;
}
.trk-set-check.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.trk-set-num {
  font-weight: 700; font-size: 0.8rem; color: var(--text-muted);
  min-width: 20px; text-align: center;
}
.trk-set-input {
  width: 70px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.85rem; text-align: center; color: var(--text); background: var(--bg);
  outline: none; transition: var(--transition);
}
.trk-set-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.trk-set-x { color: var(--text-muted); font-size: 0.8rem; }
.trk-set-done-label { color: var(--text-muted); font-size: 0.8rem; }
.trk-set-field {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 0 8px 0 0; overflow: hidden;
}
.trk-set-field .trk-set-input {
  border: none; background: none; box-shadow: none; width: 56px; padding: 6px 8px;
}
.trk-set-field .trk-set-input:focus { box-shadow: none; }
.trk-set-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.trk-set-unit { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.trk-save-btn { font-size: 0.8rem !important; padding: 8px !important; }

/* Responsive */
@media (max-width: 768px) {
  .trk-tabs { gap: 6px; }
  .trk-tab { padding: 6px 12px; font-size: 0.8rem; }
  .trk-item { padding: 12px 14px; }
  .trk-modal-box { padding: 24px 20px; }
  .trk-dday { flex-direction: column; text-align: center; gap: 12px; }
  .trk-dday-num { font-size: 2rem; }
  .trk-log-set-row { grid-template-columns: 40px 1fr 1fr; gap: 6px; }
  .trk-set-input { width: 60px; padding: 5px 6px; font-size: 0.8rem; }
  .trk-exercise-block { padding: 12px; }
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: var(--primary);
  padding: 60px 0;
  text-align: center;
  color: var(--text-on-dark);
}

.cta-banner h2 {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn-white {
  background: var(--text-on-dark);
  color: var(--primary);
  font-weight: 700;
}

.btn-white:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Footer ===== */
.footer {
  background: #0f1729;
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
  display: inline-block;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer h4 {
  font-family: 'Pretendard', sans-serif;
  color: var(--text-on-dark);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact p {
  font-size: 0.9rem;
  padding: 4px 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
}

.footer-social a:hover {
  color: var(--primary);
}

/* ===== Page Header (내부 페이지용) ===== */
.page-header {
  background: var(--bg-dark-section);
  padding: 140px 0 60px;
  text-align: center;
  color: var(--text-on-dark);
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-on-dark-muted);
  font-size: 1.05rem;
}

/* ===== Toast / Success Message ===== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2ecc71;
  color: white;
  padding: 16px 28px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
  max-width: calc(100vw - 40px);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ===== Scroll Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive — Tablet ===== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
  .instructor { grid-template-columns: 1fr; gap: 40px; }
  .instructor-img { height: 350px; }
  .classes-grid { grid-template-columns: 1fr 1fr; }
  .trial-grid { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .map-container { height: 300px; }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 768px) {
  .nav { padding: 12px 16px; }
  .nav-logo { font-size: 1.5rem; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: #0f1729;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    transition: right var(--transition);
    padding: 40px 30px;
    z-index: 1000;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    font-size: 1.1rem;
    padding: 10px 0;
  }

  .nav-cta {
    text-align: center;
    margin-top: 10px;
    padding: 14px 24px !important;
  }

  .hamburger { display: flex; }

  .hero { min-height: 100vh; min-height: 100dvh; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; padding: 0 10px; }
  .hero-badge { font-size: 0.75rem; padding: 6px 16px; }

  .section-title { font-size: 1.8rem; }
  .section-subtitle { font-size: 0.95rem; margin-bottom: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-number { font-size: 2.5rem; }
  .stat-number-sm { font-size: 1.7rem; }
  .stat-item { padding: 12px; }
  .stat-label { font-size: 0.8rem; }
  .stat-sub { font-size: 0.7rem; }

  .classes-grid { grid-template-columns: 1fr; }
  .class-card-img { height: 180px; }

  .instructor-img { height: 280px; }
  .instructor-info h2 { font-size: 2rem; }

  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-card { padding: 30px 24px; }

  .trial-info h2 { font-size: 1.8rem; }
  .trial-form { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }

  .cta-banner h2 { font-size: 1.8rem; }
  .cta-banner p { font-size: 1rem; }
  .cta-banner { padding: 40px 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .footer { padding: 40px 0 20px; }

  .section { padding: 60px 0; }
  .page-header { padding: 100px 0 40px; }
  .page-header h1 { font-size: 2rem; }

  .btn { padding: 14px 28px; font-size: 0.95rem; }

  /* 모바일 시간표 */
  .schedule-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .schedule-table {
    min-width: 640px;
  }
  .schedule-table th, .schedule-table td {
    padding: 12px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .schedule-notes { padding: 20px 16px; }
  .schedule-notes > p { font-size: 0.85rem; padding: 12px 14px; }
  .schedule-notes ul li {
    font-size: 0.85rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 0;
  }
  .schedule-notes ul li span {
    min-width: auto;
    text-align: left;
  }

  .location-details { padding: 0; }
  .map-container { height: 250px; }

  .toast { bottom: 20px; right: 20px; left: 20px; text-align: center; font-size: 0.9rem; padding: 14px 20px; }
}

/* ===== Responsive — Small Mobile ===== */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.9rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; padding: 0 20px; }
  .hero-buttons .btn { width: 100%; }

  .stat-number { font-size: 2rem; }
  .stat-number-sm { font-size: 1.4rem; }
  .stat-label { font-size: 0.72rem; }
  .stat-sub { font-size: 0.65rem; }
  .stats-grid { gap: 8px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .class-card-body { padding: 20px; }
  .class-card-body h3 { font-size: 1.2rem; }

  .trial-form { padding: 24px 16px; }
  .trial-info h2 { font-size: 1.5rem; }

  .section { padding: 48px 0; }
  .container { padding: 0 16px; }

  .footer-brand p { font-size: 0.85rem; }
}

/* ===== Safe area (노치 대응) ===== */
@supports (padding-top: env(safe-area-inset-top)) {
  .header { padding-top: env(safe-area-inset-top); }
  .hero { padding-top: env(safe-area-inset-top); }
  .footer { padding-bottom: env(safe-area-inset-bottom); }
}
