@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --ink: rgba(0, 0, 0, 0.875);
  --muted: rgba(0, 0, 0, 0.608);
  --soft: rgba(0, 0, 0, 0.56);
  --line: rgba(0, 0, 0, 0.09);
  --panel: #f7f7f6;
  --black: #080808;
  --olive: #778647;
  --olive-soft: #eef2dc;
  --text-secondary: var(--muted);
  --primary: var(--olive);
  --container: 1120px;
}

* { box-sizing: border-box; }
html { background: #fff; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 15px/1.55 "Pretendard Variable", Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; padding: 0; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 64px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
  backdrop-filter: blur(18px);
}
.header-inner {
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; width: 136px; height: 32px; color: var(--ink); }
.brand-logo { display: block; width: 100%; height: auto; }
.brand svg { display: none; }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-links { justify-self: center; }
.nav-actions { justify-self: end; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 450; letter-spacing: -0.01em; line-height: 1; text-transform: none !important; cursor: pointer; transition: color .14s ease, background .14s ease; }
.nav-link:hover { color: var(--ink); background: rgba(0, 0, 0, 0.045); }
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-link--has-menu { gap: 6px; padding-right: 8px; }
.nav-caret { width: 6px; height: 6px; margin-top: -2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .14s ease; }
.nav-menu { position: absolute; top: calc(100% + 12px); left: 0; z-index: 90; width: 240px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(248,248,247,.98); box-shadow: 0 14px 46px rgba(72,82,40,.10), 0 2px 10px rgba(0,0,0,.045); opacity: 0; pointer-events: none; transform: translateY(-4px) scale(.98); transform-origin: 0 0; transition: opacity .14s ease, transform .14s ease; backdrop-filter: blur(18px); }
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-item.is-open .nav-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.nav-item.is-open .nav-caret { transform: rotate(225deg) translate(-1px, -1px); }
.nav-menu-link { display: flex; align-items: center; padding: 8px 12px; border-radius: 8px; color: var(--muted); transition: color .14s ease, background .14s ease; }
.nav-menu-link:hover,
.nav-menu-link:focus-visible { color: var(--ink); background: rgba(0,0,0,.045); outline: 0; }
.nav-menu-link span { color: rgba(0,0,0,.78); font-size: 13px; font-weight: 560; letter-spacing: -0.006em; }
.btn {
  height: 40px;
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.14);
  font-size: 13px;
  font-weight: 520;
  letter-spacing: -0.012em;
  line-height: 1;
  text-transform: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 30px; gap: 4px; padding: 0 8px; border-radius: 10px; }
.btn-light, .btn-secondary { background: rgba(255, 255, 255, 0.82); color: var(--ink); box-shadow: inset 0 -1px rgba(0,0,0,.045); }
.btn-dark, .btn-primary { background: var(--black); color: #fff; border-color: var(--black); }
.btn-ghost { border-color: transparent; color: var(--muted); background: transparent; }
.key { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--soft); font-size: 10px; line-height: 1; text-transform: uppercase; background: #fff; }
.mobile-menu { display: none; justify-self: end; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.mobile-menu span,
.mobile-menu::before,
.mobile-menu::after { content: ""; display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 1px; }
.mobile-menu span { margin: 5px 0; }
main { padding-top: 64px; }

.site-footer { border-top: 1px solid var(--line); padding: 34px 0 58px; color: var(--muted); background: #fff; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.footer-minimal-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; max-width: 680px; }
.system { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 13px; }
.system::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--olive); box-shadow: 0 0 0 4px rgba(119,134,71,.12); }
.footer-minimal-links a { display: block; padding: 4px 0; font-size: 13px; color: var(--muted); }
.footer-minimal-links a:hover { color: var(--ink); }

.page-hero,
.leaderboard-page-hero {
  padding: 92px 0 38px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.page-hero-inner { max-width: 900px; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--soft);
  font-size: 12px;
  font-weight: 560;
  margin-bottom: 24px;
}
.breadcrumbs a:hover { color: var(--ink); }
.page-title,
.leaderboard-card h1 {
  margin: 0;
  max-width: 980px;
  color: var(--ink);
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 540;
}
.page-subtitle {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.025em;
}
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.meta-pill,
.leaderboard-live-pill,
.auth-card-kicker,
.auth-session-kicker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  color: var(--soft);
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1;
  font-weight: 640;
  letter-spacing: .08em;
  text-transform: none;
}

.section { padding: 56px 0 92px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.content-stack { display: grid; gap: 16px; }
.content-card,
.leaderboard-card,
.auth-card,
.profile-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 22px 70px rgba(30,28,45,.08);
}
.content-card { padding: 26px; }
.content-card h2 { margin: 0 0 12px; color: var(--ink); font-size: 28px; line-height: 1.08; letter-spacing: -0.055em; font-weight: 560; }
.content-card p,
.content-card li { color: rgba(0,0,0,.7); font-size: 17px; line-height: 1.75; letter-spacing: -0.015em; }
.content-card p { margin: 0 0 14px; }
.content-card ul { margin: 12px 0 0; padding-left: 22px; }
.content-card a { border-bottom: 1px solid rgba(0,0,0,.22); }
.sidebar-card { position: sticky; top: 92px; }

.leaderboard-page-main,
.profile-page-main { min-height: 70vh; }
.public-leaderboard--page,
.public-profile-section { padding: 84px 0 116px; }
.leaderboard-shell,
.leaderboard-shell--standalone,
.profile-page-container { max-width: 1120px; margin: 0 auto; }
.leaderboard-card,
.profile-shell { padding: clamp(28px, 5vw, 64px); }
.leaderboard-card { min-height: 360px; background: #fff; border-radius: 28px; }
.leaderboard-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.leaderboard-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 760px; }
.leaderboard-list li,
.leaderboard-loading-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  padding: 16px 18px;
  color: var(--muted);
}
.leaderboard-footnote { color: var(--soft); font-size: 13px; }

.login-main--interfere { min-height: 100dvh; background: #fff; }
.auth-split { min-height: calc(100dvh - 64px); display: grid; grid-template-columns: 1fr; place-items: center; padding: 72px 24px 26px; background: #fff; }
.auth-panel--form { display: flex; align-items: center; justify-content: center; padding: 0; width: 100%; }
.auth-frame { width: min(100%, 380px); min-height: calc(100dvh - 162px); display: flex; flex-direction: column; align-items: stretch; justify-content: center; border: 0; border-radius: 0; background: transparent; padding: 74px 0 0; box-shadow: none; position: relative; }
.auth-logo { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: inline-flex; width: 136px; height: 32px; opacity: 1; transition: opacity .15s ease; }
.auth-logo:hover { opacity: 1; }
.auth-card { width: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; display: grid; gap: 24px; }
.auth-card [hidden] { display: none !important; }
.auth-card-header { display: grid; justify-items: center; gap: 8px; margin: 0 0 4px; text-align: center; }
.auth-card h1 { margin: 0; color: #161616; font-size: 29px; line-height: .98; letter-spacing: -0.07em; font-weight: 760; }
.auth-card-kicker,
.auth-session-kicker { background: transparent; border: 0; padding: 0; color: #6f6f6f; font-size: 15px; font-weight: 400; letter-spacing: -0.012em; line-height: 1.45; text-transform: none; }
.auth-card-kicker { max-width: 340px; margin: 0; text-wrap: balance; }
.auth-mode-switch { justify-self: center; display: none; grid-template-columns: auto auto; gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.auth-mode-tab { border: 0; border-radius: 999px; padding: 6px 10px; background: transparent; color: var(--soft); font: inherit; font-size: 12px; line-height: 1; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.auth-mode-tab.active { background: var(--olive-soft); color: var(--olive-dark, #465126); box-shadow: inset 0 0 0 1px rgba(119,134,71,.18); }
.auth-form,
.auth-field { display: grid; gap: 8px; }
.auth-form { gap: 16px; }
.auth-field label { display: flex; align-items: center; justify-content: space-between; color: #202020; font-size: 14px; font-weight: 720; letter-spacing: -0.035em; text-transform: none; }
.auth-forgot { color: #6f6f6f; font-size: 12px; font-weight: 620; letter-spacing: -0.02em; }
.auth-input { width: 100%; min-height: 40px; border: 1px solid rgba(0,0,0,.13); border-radius: 11px; background: #fff; color: var(--ink); padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 560; letter-spacing: -0.025em; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.auth-input::placeholder { color: rgba(0,0,0,.36); font-weight: 650; }
.auth-input:focus { border-color: rgba(119,134,71,.7); box-shadow: 0 0 0 4px rgba(119,134,71,.13); }
.auth-submit,
.auth-google-btn { width: 100%; min-height: 40px; border-radius: 999px; font-size: 13px; font-weight: 760; letter-spacing: -0.035em; }
.auth-submit,
.auth-session-actions .btn-primary { background: #778647; border-color: #778647; color: #fff; box-shadow: 0 14px 28px rgba(119,134,71,.16); }
.auth-submit:hover,
.auth-session-actions .btn-primary:hover { background: #6d7a40; border-color: #6d7a40; }
.auth-google-btn { gap: 8px; background: #fff; color: #161616; border-color: rgba(0,0,0,.12); box-shadow: none; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 12px; }
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card-note { margin: auto 0 0; min-height: 24px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; background: transparent; color: #6f6f6f; font-size: 13px; line-height: 1.5; font-weight: 500; letter-spacing: -0.02em; }
.auth-card-note a,
.auth-card-note button { appearance: none; border: 0; padding: 0; background: transparent; color: #161616; font: inherit; font-weight: 780; text-decoration: none; cursor: pointer; }
.auth-consent { display: none; align-items: flex-start; gap: 8px; color: #4e555b; font-size: 11px; line-height: 1.35; }
.auth-consent input { width: 12px; height: 12px; margin-top: 1px; accent-color: var(--olive); }
.auth-card.is-signup .auth-google-btn { order: 6; }
.auth-card.is-signup .auth-divider { order: 5; }
.auth-card.is-signup .auth-form { order: 4; }
.auth-card.is-signup .auth-consent { display: flex; }
.auth-card.is-signup .auth-submit { margin-top: 4px; }
.auth-card:not(.is-signup) .auth-consent { display: none; }
.auth-feedback { border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.auth-feedback--error { background: #f8eeee; color: #8c2e28; border: 1px solid #efd2cf; }
.auth-feedback--success { background: var(--olive-soft); color: #596333; border: 1px solid #dbe4b8; }
.auth-session-panel { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbfa; padding: 16px; }
.auth-session-panel h3 { margin: 0; font-size: 22px; line-height: 1.12; letter-spacing: -0.04em; }
.auth-session-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-session-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-panel--visual { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f6f6f4; }
.auth-panel--visual::after { content: ""; position: absolute; inset: auto 0 0; height: 32%; background: linear-gradient(to bottom, rgba(246,246,244,0), #f6f6f4 78%); pointer-events: none; }
.auth-collage { position: relative; width: min(620px, calc(100% - 72px)); height: min(720px, 78vh); transform: none; }
.auth-window { position: absolute; border: 1px solid rgba(0,0,0,.09); background: rgba(255,255,255,.78); border-radius: 16px; box-shadow: 0 26px 80px rgba(36,40,24,.08); backdrop-filter: blur(18px); }
.auth-window--large { top: 3%; left: 0; width: 100%; height: 430px; padding: 18px; }
.auth-window-bar { display: flex; align-items: center; gap: 7px; color: var(--soft); font-size: 12px; font-weight: 560; }
.auth-window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #d7dcc4; }
.auth-window-bar strong { margin-left: 8px; color: var(--muted); font-weight: 560; }
.auth-timeline { display: grid; gap: 14px; margin-top: 38px; padding: 24px; border-radius: 14px; background: #fbfbfa; }
.auth-timeline i { display: block; width: var(--w); height: 34px; border-radius: 999px; background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.auth-timeline i:nth-child(even) { margin-left: 34%; }
.auth-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.auth-metrics span { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 16px; color: var(--soft); font-size: 13px; }
.auth-metrics b { display: block; color: var(--ink); font-size: 26px; line-height: 1; letter-spacing: -0.05em; }
.auth-window--small { width: 292px; min-height: 132px; padding: 18px; display: grid; align-content: end; gap: 12px; }
.auth-window--one { left: 0; bottom: 14%; }
.auth-window--two { right: 0; bottom: 0; }
.auth-mini-kicker { color: var(--soft); font-size: 12px; font-weight: 560; }
.auth-window--small strong { font-size: 20px; line-height: 1.12; letter-spacing: -0.045em; font-weight: 560; }
.auth-helper { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.calculator-page { background: transparent; }
.calculator-hero { padding-top: 82px; }
.calculator-title { color: var(--ink); text-wrap: balance; }

.footer,
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 50px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
}
.footer-content-stacked,
.footer-minimal {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand .brand { width: 112px; }
.footer-links,
.footer-minimal-links { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; font-weight: 520; }
.footer-links a:hover,
.footer-minimal-links a:hover { color: var(--ink); }
.footer-copy { margin: 14px 0 0; color: var(--soft); font-size: 13px; }

@media (max-width: 820px) {
  .container { width: min(100% - 32px, var(--container)); }
  .header-inner { padding: 0 14px; grid-template-columns: 1fr auto; position: relative; gap: 16px; }
  .nav-links,
  .nav-actions { display: none; }
  .mobile-menu { display: inline-flex; flex-direction: column; }
  .site-header.is-open { height: 100svh; background: rgba(255,255,255,.98); }
  .site-header.is-open::before { content: ""; position: fixed; inset: 64px 0 0; z-index: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); pointer-events: none; }
  .site-header.is-open .header-inner { position: static; }
  .site-header.is-open .nav-links,
  .site-header.is-open .nav-actions {
    position: absolute;
    left: 14px;
    right: 14px;
    display: grid;
    justify-items: stretch;
    justify-self: stretch;
    gap: 8px;
    width: auto;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 48px rgba(0,0,0,.08);
    backdrop-filter: blur(18px);
    z-index: 1;
  }
  .site-header.is-open .nav-links { top: 64px; bottom: 140px; max-height: calc(100svh - 224px); overflow-y: auto; border-radius: 16px 16px 0 0; border-bottom: 0; }
  .site-header.is-open .nav-actions { top: auto; bottom: 18px; border-radius: 0 0 16px 16px; }
  .site-header.is-open .nav-link,
  .site-header.is-open .nav-actions .btn { width: 100%; justify-content: center; height: 40px; }
  .site-header.is-open .nav-item { display: grid; width: 100%; gap: 6px; }
  .site-header.is-open .nav-link--has-menu { width: 100%; justify-content: center; }
  .site-header.is-open .nav-menu { position: static; display: none; width: 100%; padding: 6px; border-radius: 12px; box-shadow: none; opacity: 1; pointer-events: auto; transform: none; }
  .site-header.is-open .nav-item.is-open .nav-menu { display: grid; }
  .site-header.is-open .nav-menu::before { display: none; }
  .site-header.is-open .nav-menu-link { min-height: 38px; justify-content: center; padding: 9px 10px; }
  .footer-grid { display: grid; gap: 24px; }
  .footer-minimal-links { justify-content: flex-start; }
  .brand { width: 104px; }
  .page-hero,
  .leaderboard-page-hero { padding-top: 70px; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .leaderboard-card-head { display: grid; }
  .footer-content-stacked,
  .footer-minimal { display: grid; }
  .calculator-title { white-space: normal; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-panel--form { padding: 0; }
  .auth-frame { min-height: 100dvh; border: 0; border-radius: 0; padding: 20px; }
  .auth-panel--visual { display: none; }
  .auth-card { width: min(350px, 100%); }
  .auth-session-actions { grid-template-columns: 1fr; }
}
