@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --surface: #f1f4f9;
  --accent: #0055a6;
  --accent-hover: #004485;
  --accent-deep: #002242;
  --accent-soft: rgba(0, 85, 166, 0.10);
  --accent-tint: rgba(0, 85, 166, 0.06);
  --text: #0f172a;
  --text-dim: #475569;
  --text-faint: #94a3b8;
  --hairline: rgba(15, 23, 42, 0.08);
  --hairline-strong: rgba(15, 23, 42, 0.14);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-accent: 0 8px 24px rgba(0, 85, 166, 0.22);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  /* Account for fixed nav-pill height so anchor jumps & scrollIntoView land below the nav */
  scroll-padding-top: 100px;
}

html, body {
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  line-height: 1.5;
}

body {
  min-height: 100dvh;
  margin: 0;
  position: relative;
  background: transparent;
}

/* Soft blue mesh — subtle, like a brochure */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(0, 85, 166, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 45% at 92% 18%, rgba(0, 34, 66, 0.06), transparent 60%),
    radial-gradient(ellipse 70% 55% at 50% 110%, rgba(0, 85, 166, 0.05), transparent 65%),
    var(--bg);
}

::selection { background: var(--accent-soft); color: var(--accent-deep); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.22); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(2rem); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-up {
  opacity: 0;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-up.delay-1 { animation-delay: 0.08s; }
.fade-up.delay-2 { animation-delay: 0.16s; }
.fade-up.delay-3 { animation-delay: 0.24s; }
.fade-up.delay-4 { animation-delay: 0.32s; }

/* Double-bezel card — soft white inside a hairline tray */
.bezel {
  background: rgba(15, 23, 42, 0.025);
  border: 1px solid var(--hairline);
  padding: 6px;
  border-radius: 32px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bezel:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--hairline-strong);
}
.bezel-inner {
  background: var(--bg-elev);
  border-radius: calc(32px - 6px);
  box-shadow: var(--shadow-md);
  padding: 24px 28px;
}

/* Glass surface (light, frosted) */
.glass {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-sm);
}

/* Eyebrow tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 85, 166, 0.55);
  animation: float 3s ease-in-out infinite;
}

/* Top-left brand mark (logo + stacked name) */
.brand-mark {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 210;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--accent-deep);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-mark:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-soft);
}
.brand-mark img {
  width: 42px;
  height: 42px;
  display: block;
  flex-shrink: 0;
}
.brand-mark .brand-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .brand-mark {
    padding: 8px 14px 8px 8px;
    top: 12px; left: 12px;
    gap: 8px;
    border-radius: 14px;
  }
  .brand-mark img { width: 32px; height: 32px; }
  .brand-mark .brand-name { font-size: 0.68rem; }
}

/* Floating nav pill */
.nav-pill {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
}
.nav-pill a {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.nav-pill a:hover { color: var(--text); background: rgba(15, 23, 42, 0.05); }
.nav-pill a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-accent);
}
/* Temporarily hidden until notices are published. Remove this rule to bring it back. */
.nav-pill a[href="notice.html"] { display: none; }

/* Language toggle inside the nav pill */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--hairline);
  gap: 0;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-faint);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  line-height: 1;
  min-width: 22px;
  text-align: center;
}
.lang-toggle button:hover {
  color: var(--text);
}
.lang-toggle button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 85, 166, 0.35);
}
/* The CJK glyph is wider — drop the tracking just for that button. */
.lang-toggle button[data-lang-to^="zh"],
.lang-toggle button[data-lang-to="ja"] {
  letter-spacing: 0;
  font-size: 12px;
}

/* Premium button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-accent);
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 85, 166, 0.35);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--hairline);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.22);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.15); }

/* Input fields */
.input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input::placeholder { color: var(--text-faint); }

textarea.input {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

/* Layout */
.container-app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Headlines */
.headline {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.subhead {
  color: var(--text-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.6;
  max-width: 560px;
  margin: 16px auto 0;
}

/* Hidden util */
.hidden { display: none !important; }

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--bg-elev);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text);
  z-index: 2000;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.error { border-color: rgba(220, 38, 38, 0.35); color: #b91c1c; }
.toast.success { border-color: rgba(16, 185, 129, 0.35); color: #047857; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  max-width: 720px;
  width: 100%;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 40px 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal .close-btn {
  position: absolute;
  top: 20px; right: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 18px;
}
.modal .close-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

/* Pin badge */
.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 640px) {
  .modal { padding: 32px 24px; border-radius: 24px; }
  .bezel { padding: 5px; border-radius: 24px; }
  .bezel-inner { padding: 18px 20px; border-radius: calc(24px - 5px); }
}

/* Mobile header: collapse the wide nav pill into a hamburger menu.
   Injected .nav-toggle button (assets/nav-menu.js) opens/closes .nav-pill.open.
   Kept below the 640px block so these rules win where both apply. */
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 220;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-md);
    color: var(--accent-deep);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  /* The pill becomes a dropdown panel anchored under the toggle, top-right. */
  .nav-pill {
    top: 66px;
    left: auto;
    right: 12px;
    transform: translateY(-8px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: 18px;
    width: max-content;
    max-width: min(78vw, 280px);
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .nav-pill.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-pill a {
    padding: 11px 16px;
    font-size: 14px;
    border-radius: 12px;
    justify-content: flex-start;
  }
  .lang-toggle {
    margin-left: 0;
    margin-top: 6px;
    justify-content: center;
    border-top: 1px solid var(--hairline);
    padding-top: 8px;
  }
}

/* ── 언어 고르기 (2026-11-02, 7개 언어) ─────────────────────────────
   데스크톱: 지금 언어 버튼 하나("EN ▾") → 누르면 목록. 휴대폰·접힌 메뉴: 짧은 이름 7개를 한 줄로. */
.lang-toggle { position: relative; }
.lang-toggle .lang-current {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text); padding: 5px 10px; min-width: 0;
}
.lang-toggle .lang-current::after { content: "\25BE"; font-size: 9px; opacity: 0.55; letter-spacing: 0; }
.lang-toggle .lang-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: -4px; z-index: 230;
  flex-direction: column; gap: 2px; min-width: 176px; padding: 6px;
  border-radius: 16px; background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-md);
}
.lang-toggle.open .lang-menu { display: flex; }
.lang-toggle .lang-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0; text-align: left; line-height: 1.2;
  color: var(--text-dim);
}
.lang-toggle .lang-menu button:hover { background: rgba(15, 23, 42, 0.05); color: var(--text); }
.lang-toggle .lang-menu button.active { color: #fff; background: var(--accent); box-shadow: none; }
.lang-toggle .lang-menu .lang-code { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; opacity: 0.6; }
@media (max-width: 720px) {
.lang-toggle .lang-current { display: none; }
.lang-toggle .lang-menu {
  display: flex; position: static; flex-direction: row; flex-wrap: wrap; justify-content: center;
  min-width: 0; padding: 0; gap: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
.lang-toggle .lang-menu button {
  display: inline-block; width: auto; padding: 5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-align: center; line-height: 1;
}
.lang-toggle .lang-menu .lang-name { display: none; }
.lang-toggle .lang-menu .lang-code { font-size: inherit; font-weight: inherit; letter-spacing: inherit; opacity: 1; }
.lang-toggle .lang-menu button[data-lang-to^="zh"],
.lang-toggle .lang-menu button[data-lang-to="ja"] { letter-spacing: 0; font-size: 12px; }
}

/* 메뉴가 로고와 겹치거나 화면 밖으로 나가면 nav-menu.js 가 <html> 에 nav-collapsed 를 붙인다 —
   폭과 상관없이 위 720px 휴대폰 메뉴(☰)와 똑같이 보인다. */
html.nav-collapsed .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 220;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-md);
    color: var(--accent-deep);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
html.nav-collapsed .nav-pill {
    top: 66px;
    left: auto;
    right: 12px;
    transform: translateY(-8px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: 18px;
    width: max-content;
    max-width: min(78vw, 280px);
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
html.nav-collapsed .nav-pill.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
html.nav-collapsed .nav-pill a {
    padding: 11px 16px;
    font-size: 14px;
    border-radius: 12px;
    justify-content: flex-start;
  }
html.nav-collapsed .lang-toggle {
    margin-left: 0;
    margin-top: 6px;
    justify-content: center;
    border-top: 1px solid var(--hairline);
    padding-top: 8px;
  }
html.nav-collapsed .lang-toggle .lang-current { display: none; }
html.nav-collapsed .lang-toggle .lang-menu {
  display: flex; position: static; flex-direction: row; flex-wrap: wrap; justify-content: center;
  min-width: 0; padding: 0; gap: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
html.nav-collapsed .lang-toggle .lang-menu button {
  display: inline-block; width: auto; padding: 5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-align: center; line-height: 1;
}
html.nav-collapsed .lang-toggle .lang-menu .lang-name { display: none; }
html.nav-collapsed .lang-toggle .lang-menu .lang-code { font-size: inherit; font-weight: inherit; letter-spacing: inherit; opacity: 1; }
html.nav-collapsed .lang-toggle .lang-menu button[data-lang-to^="zh"], html.nav-collapsed .lang-toggle .lang-menu button[data-lang-to="ja"] { letter-spacing: 0; font-size: 12px; }
/* 폭을 재는 동안 애니메이션이 번쩍이지 않게 */
html.nav-measuring .nav-pill, html.nav-measuring .nav-pill * { transition: none !important; }

