@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-soft: #eff6ff;
  --up: #ef4444;
  --down: #3b82f6;
  --text: #111827;
  --text-secondary: #4b5563;
  --muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --footer-bg: #fafafa;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 10px;
  --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 400px at 10% -10%, #eef4ff 0%, transparent 55%),
    radial-gradient(900px 360px at 90% 0%, #f4f7fb 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; transition: color .15s ease; }
button, input, select { font-family: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.logo .num {
  color: #ef4444;
  font-style: italic;
}
.logo .name { color: #0f172a; }
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.nav-links a:hover { color: var(--primary); }
.auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-user {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.btn-text {
  height: auto;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn-text:hover { color: var(--primary); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.btn-half { flex: 1; height: 46px; }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  padding: 36px 0 44px;
}
.footer-top {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 260px; }
.footer-brand .logo { margin-bottom: 14px; font-size: 18px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--primary); }
.footer-links a.is-active,
.footer-links a strong {
  color: var(--primary);
  font-weight: 700;
}
.footer-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
}
.footer-cert {
  width: 252px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.cert-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 0;
}
.cert-row > img {
  display: block;
  width: 252px;
  max-width: 100%;
  height: 50px;
  object-fit: contain;
  object-position: left center;
}
.pngclass {
  padding: 8px 10px;
  width: 252px;
  max-width: 100%;
  height: 50px;
  border: 1px solid #EBEBEB;
  border-radius: 4px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
}
.pngclass img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Legal page */
.legal-page {
  padding: 36px 24px 60px;
  max-width: 860px;
}
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.legal-tabs a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  color: var(--text-secondary);
}
.legal-tabs a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.legal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 28px 36px;
  box-shadow: var(--shadow-md);
}
.legal-card h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.legal-body {
  font-size: 14px;
  line-height: 1.85;
  color: #374151;
  word-break: keep-all;
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .form-card { padding: 32px 22px 28px; }
  .footer-cert {
    width: 100%;
    max-width: 252px;
  }
  .legal-card { padding: 22px 18px 28px; }
}

.form-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
}
.form-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 40px 36px;
  background: #fff;
  box-shadow: var(--shadow-md);
  animation: fadeUp .35s ease both;
}
.form-card.wide { max-width: 460px; }
.form-card h1 {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.field { margin-bottom: 4px; }
.field + .field { margin-top: 4px; }
.field input,
.field select {
  width: 100%;
  border: none;
  border-bottom: 1px solid #d1d5db;
  padding: 14px 2px;
  font-size: 15px;
  outline: none;
  background: transparent;
  color: var(--text);
  transition: border-color .15s ease;
}
.field input::placeholder,
.field select:invalid {
  color: #9ca3af;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ca3af' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
  cursor: pointer;
}
.field input:focus,
.field select:focus {
  border-bottom-color: var(--primary);
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}
.form-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.form-footer a {
  color: var(--primary);
  font-weight: 600;
}
.form-error {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
}
.form-error.show { display: block; }

.up { color: var(--up) !important; font-variant-numeric: tabular-nums; }
.down { color: var(--down) !important; font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

