:root {
  --ds-blue: #245be7;
  --ds-blue-dark: #1748c7;
  --ds-blue-soft: #eef4ff;
  --ds-ink: #11151d;
  --ds-text: #3f4858;
  --ds-muted: #70798b;
  --ds-bg: #f5f7fa;
  --ds-line: #e1e5eb;
  --ds-white: #fff;
  --ds-success: #16845b;
  --ds-danger: #d92d20;
  --ds-radius: 16px;
  --ds-shadow: 0 18px 60px rgba(17, 21, 29, .08);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--ds-bg); }

body.auth-page,
body.join-page,
body.account-page {
  min-height: 100vh;
  margin: 0;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea { font: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(36, 91, 231, .2);
  outline-offset: 2px;
}

.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid rgba(225, 229, 235, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}

.hdr .logo { display: inline-flex; align-items: center; text-decoration: none; }
.hdr .logo img { width: auto; height: 24px; display: block; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
}

.header-nav a,
.hdr .right a {
  color: var(--ds-text);
  text-decoration: none;
}

.header-nav a:hover,
.hdr .right a:hover { color: var(--ds-blue); }

.hdr .right {
  min-height: 40px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
}

.hdr .right > a:last-child {
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ds-blue);
  color: #fff;
}

.hdr .right > a:last-child:hover { background: var(--ds-blue-dark); color: #fff; }

.userwrap { position: relative; }

.userbtn {
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ds-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.userbtn::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ds-success);
  content: "";
  box-shadow: 0 0 0 4px rgba(22, 132, 91, .1);
}

.usermenu {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 220px;
  padding: 8px;
  display: none;
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 21, 29, .14);
}

.usermenu.open { display: block; }
.usermenu .who { margin-bottom: 4px; padding: 10px 12px; border-bottom: 1px solid var(--ds-line); color: var(--ds-muted); font-size: 11px; }
.usermenu a { padding: 10px 12px; display: block; border-radius: 8px; color: var(--ds-text); font-size: 13px; text-decoration: none; }
.usermenu a:hover { background: var(--ds-bg); }

/* Login */
.auth-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 172px);
  margin: 48px auto 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(400px, .74fr);
  overflow: hidden;
  border: 1px solid var(--ds-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--ds-shadow);
}

.auth-story {
  position: relative;
  min-height: 620px;
  padding: clamp(42px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(101, 151, 255, .26), transparent 32%),
    linear-gradient(145deg, #101722 0%, #17233b 58%, #203c78 100%);
  color: #fff;
}

.auth-story::after {
  position: absolute;
  right: -160px;
  bottom: -190px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .02);
}

.auth-kicker {
  position: relative;
  z-index: 2;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #92b4ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.auth-kicker::before { width: 28px; height: 2px; background: currentColor; content: ""; }

.auth-story h1 {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0;
  font-size: clamp(36px, 4.3vw, 60px);
  line-height: 1.12;
  letter-spacing: -.052em;
}

.auth-story > p {
  position: relative;
  z-index: 2;
  max-width: 470px;
  margin: 22px 0 0;
  color: #bbc8df;
  font-size: 15px;
  line-height: 1.8;
}

.story-products {
  position: relative;
  z-index: 2;
  height: 230px;
  margin-top: 44px;
}

.story-product {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .22);
}

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

.story-product-lanyard { left: 2%; bottom: 0; width: 50%; height: 190px; transform: rotate(-4deg); }
.story-product-card { right: 1%; top: 0; width: 46%; height: 180px; transform: rotate(5deg); }

.login-card.auth-login {
  align-self: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 58px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-card .auth-kicker { margin-bottom: 16px; color: var(--ds-blue); }
.login-card h2 { margin: 0; display: block; font-size: 34px; line-height: 1.25; letter-spacing: -.04em; }
.login-card .sub { margin: 10px 0 30px; display: block; color: var(--ds-muted); font-size: 14px; }
.login-card .lgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.login-card .fld label { margin-bottom: 7px; display: block; color: var(--ds-text); font-size: 12px; font-weight: 750; }
.login-card .fld input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #cfd5df;
  border-radius: 10px;
  background: #fff;
  color: var(--ds-ink);
}
.login-card .fld input:focus { border-color: var(--ds-blue); outline: 0; box-shadow: 0 0 0 3px rgba(36, 91, 231, .12); }
.auth-actions { margin-top: 22px; display: grid; grid-template-columns: 1fr; gap: 10px; }
.login-card .btn {
  min-height: 50px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ds-blue);
  border-radius: 10px;
  background: var(--ds-blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}
.login-card .btn:hover { background: var(--ds-blue-dark); }
.login-card .btn.ghost { border-color: var(--ds-line); background: #fff; color: var(--ds-text); }
.login-card .btn.ghost:hover { background: var(--ds-bg); }
.login-card .err { min-height: 22px; margin-top: 10px; color: var(--ds-danger); font-size: 12px; }
.auth-fineprint { margin: 20px 0 0; color: var(--ds-muted); font-size: 11px; text-align: center; }

.auth-benefits {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ds-line);
}

.auth-benefit { min-height: 110px; padding: 24px 28px; border-right: 1px solid var(--ds-line); }
.auth-benefit:last-child { border-right: 0; }
.auth-benefit span { color: var(--ds-blue); font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.auth-benefit strong { margin-top: 6px; display: block; font-size: 15px; }
.auth-benefit p { margin: 4px 0 0; color: var(--ds-muted); font-size: 12px; }

/* Logged-in landing */
.member-home { width: min(1180px, calc(100% - 48px)); margin: 50px auto 80px; }
.member-hero {
  position: relative;
  min-height: 280px;
  padding: clamp(34px, 5vw, 62px);
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(138deg, #111925, #1a2a4a 60%, #245be7 145%);
  color: #fff;
}
.member-hero::after { position: absolute; right: -80px; top: -170px; width: 450px; height: 450px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; box-shadow: 0 0 0 70px rgba(255,255,255,.025); }
.member-hero .auth-kicker { margin-bottom: 16px; }
.member-hero h1 { position: relative; z-index: 2; max-width: 720px; margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.18; letter-spacing: -.05em; }
.member-hero p { position: relative; z-index: 2; margin: 16px 0 0; color: #bdc9dc; font-size: 14px; }
.member-hero-actions { position: relative; z-index: 2; margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
.member-hero-actions a { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; font-size: 13px; font-weight: 750; text-decoration: none; }
.member-hero-actions a:first-child { border-color: #fff; background: #fff; color: #18233a; }

.workspace-heading { margin: 50px 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.workspace-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.workspace-heading p { margin: 6px 0 0; color: var(--ds-muted); font-size: 13px; }
.workspace-heading > span { color: var(--ds-blue); font-size: 11px; font-weight: 850; letter-spacing: .1em; }

.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.launch-card {
  position: relative;
  min-height: 320px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--ds-line);
  border-radius: 20px;
  background: #fff;
  color: var(--ds-ink);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.launch-card:hover { transform: translateY(-4px); border-color: #aebff0; box-shadow: 0 18px 48px rgba(17,21,29,.1); }
.launch-card.dark { border-color: #151d2b; background: #151d2b; color: #fff; }
.launch-card .num { color: var(--ds-blue); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.launch-card h3 { max-width: 310px; margin: 18px 0 8px; font-size: 28px; line-height: 1.25; letter-spacing: -.035em; }
.launch-card p { max-width: 340px; margin: 0; color: var(--ds-muted); font-size: 13px; }
.launch-card.dark p { color: #aeb8ca; }
.launch-card .launch-arrow { position: absolute; right: 28px; bottom: 26px; font-size: 13px; font-weight: 800; }
.launch-visual {
  position: absolute;
  right: 34px;
  bottom: 52px;
  width: 168px;
  height: 168px;
  overflow: hidden;
  border: 1px solid var(--ds-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(17, 21, 29, .16);
  transform: rotate(2deg);
  transition: transform .2s ease;
}
.launch-card:hover .launch-visual { transform: rotate(0) scale(1.025); }
.launch-card.dark .launch-visual { border-color: rgba(255, 255, 255, .2); box-shadow: 0 20px 48px rgba(0, 0, 0, .34); }
.launch-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }

.member-secondary { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.member-secondary a { min-height: 72px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--ds-line); border-radius: 14px; background: #fff; color: var(--ds-text); font-size: 14px; font-weight: 750; text-decoration: none; }
.member-secondary a:hover { border-color: #aebff0; }

/* Join */
.join-shell {
  width: min(1080px, calc(100% - 48px));
  margin: 48px auto 72px;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  overflow: hidden;
  border: 1px solid var(--ds-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--ds-shadow);
}

.join-aside {
  padding: clamp(38px, 5vw, 64px);
  background: linear-gradient(145deg, #111925, #1c2e53);
  color: #fff;
}
.join-aside h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); line-height: 1.18; letter-spacing: -.05em; }
.join-aside > p { margin: 18px 0 0; color: #b9c5d8; font-size: 14px; }
.join-steps { margin: 42px 0 0; padding: 0; display: grid; gap: 22px; list-style: none; counter-reset: join-step; }
.join-steps li { position: relative; min-height: 42px; padding-left: 56px; color: #c3cee0; font-size: 13px; counter-increment: join-step; }
.join-steps li::before { position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #fff; content: counter(join-step); font-weight: 800; }
.join-steps strong { display: block; color: #fff; font-size: 14px; }

.join-card { width: 100%; max-width: 600px; padding: clamp(34px, 5vw, 58px); justify-self: center; }
.join-card h2 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.join-card .sub { margin: 8px 0 18px; color: var(--ds-muted); font-size: 13px; }
.join-card .note { margin: 0 0 24px; padding: 12px 14px; border: 1px solid #cfe0ff; border-radius: 10px; background: var(--ds-blue-soft); color: #27406e; font-size: 12px; }
.join-card label { margin: 16px 0 7px; display: block; color: var(--ds-text); font-size: 12px; font-weight: 750; }
.join-card input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #cfd5df; border-radius: 10px; background: #fff; color: var(--ds-ink); }
.join-card input:focus { border-color: var(--ds-blue); outline: 0; box-shadow: 0 0 0 3px rgba(36,91,231,.12); }
.join-card input:disabled,
.join-card input[readonly] { background: #f5f7fa; color: var(--ds-muted); }
.join-card .row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.join-card .row button { min-width: 126px; padding: 0 14px; border: 1px solid var(--ds-ink); border-radius: 10px; background: var(--ds-ink); color: #fff; cursor: pointer; font-size: 12px; font-weight: 800; white-space: nowrap; }
.join-card .row button:disabled { border-color: #aeb6c7; background: #aeb6c7; cursor: default; }
.join-card .hint { min-height: 18px; margin-top: 6px; font-size: 11px; }
.join-card .hint.ok { color: var(--ds-success); }
.join-card .hint.err,
.join-card .err { color: var(--ds-danger); }
.join-card .hint.muted { color: var(--ds-muted); }
.join-card .terms { margin-top: 20px; display: flex; align-items: flex-start; gap: 9px; color: var(--ds-text); font-size: 12px; }
.join-card .terms input { width: auto; min-height: auto; margin-top: 3px; accent-color: var(--ds-blue); }
.join-card .submit { width: 100%; min-height: 50px; margin-top: 22px; border: 0; border-radius: 10px; background: var(--ds-blue); color: #fff; cursor: pointer; font-weight: 800; }
.join-card .submit:hover { background: var(--ds-blue-dark); }
.join-card .submit:disabled { background: #aeb6c7; cursor: default; }
.join-card .err { min-height: 20px; margin-top: 10px; font-size: 12px; text-align: center; }
.join-card .foot { margin-top: 18px; color: var(--ds-muted); font-size: 12px; text-align: center; }
.join-card .foot a { color: var(--ds-blue); font-weight: 800; text-decoration: none; }

/* Account */
.account-page .wrap { width: min(1180px, calc(100% - 48px)); max-width: none; margin: 44px auto 80px; padding: 0; }
.account-hero { margin-bottom: 28px; padding: 38px 42px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-radius: 20px; background: linear-gradient(138deg,#121b2a,#223d74); color: #fff; }
.account-hero h1 { margin: 0; font-size: 38px; letter-spacing: -.045em; }
.account-hero p { margin: 8px 0 0; color: #bac7da; font-size: 13px; }
.account-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-hero-actions a { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 10px; color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }
.account-hero-actions a:first-child { border-color: #fff; background: #fff; color: #18233a; }
.account-page .page,
.account-page .page-sub { display: none; }
.account-page #content { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 16px; align-items: start; }
.account-page #content .card { margin: 0; padding: 24px; overflow-x: auto; border: 1px solid var(--ds-line); border-radius: 16px; background: #fff; box-shadow: none; }
.account-page #content .card:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
.account-page #content .card:nth-child(1) { grid-column: 1; grid-row: 2; }
.account-page #content .card:nth-child(3) { grid-column: 2; grid-row: 2; }
.account-page .card h2 { margin: 0 0 16px; font-size: 18px; }
.account-page .card h2 .ic { background: var(--ds-blue-soft); color: var(--ds-blue); }
.account-page .tip { border-color: #cfe0ff; background: var(--ds-blue-soft); }
.account-page .tpls { grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 14px; }
.account-page .tpl { border-color: var(--ds-line); border-radius: 14px; }
.account-page .tpl .pv { height: 220px; }
.account-page .btn { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 10px; background: var(--ds-blue); }
.account-page .ftr { display: none; }

.ftr { margin-top: 0; padding: 26px 28px; border-top: 1px solid var(--ds-line); color: var(--ds-muted); font-size: 11px; text-align: center; }

@media (max-width: 900px) {
  .header-nav { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 450px; }
  .story-products { height: 160px; margin-top: 28px; }
  .story-product-lanyard { height: 142px; }
  .story-product-card { height: 136px; }
  .login-card.auth-login { max-width: 620px; }
  .join-shell { grid-template-columns: 1fr; }
  .join-aside { padding-bottom: 42px; }
  .join-steps { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .join-steps li { padding: 50px 0 0; }
  .account-page #content { grid-template-columns: 1fr; }
  .account-page #content .card:nth-child(n) { grid-column: 1; grid-row: auto; }
  .account-page #content .card:nth-child(2) { grid-row: 1; }
}

@media (max-width: 640px) {
  .hdr { height: 60px; padding: 0 16px; }
  .hdr .logo img { height: 21px; }
  .hdr .right { gap: 10px; }
  .hdr .right > a { font-size: 12px; }
  .hdr .right > a:last-child { min-height: 36px; padding: 0 12px; }
  .userbtn { min-width: 36px; height: 36px; padding: 0 10px; }
  .auth-shell,
  .join-shell,
  .member-home,
  .account-page .wrap { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .auth-story { min-height: 360px; padding: 34px 24px; }
  .auth-story h1 { font-size: 38px; }
  .auth-story > p { margin-top: 16px; font-size: 13px; }
  .story-products { height: 128px; margin-top: 26px; }
  .story-product-lanyard { width: 52%; height: 116px; }
  .story-product-card { width: 44%; height: 112px; }
  .login-card.auth-login { padding: 38px 24px 50px; }
  .login-card h2 { font-size: 30px; }
  .auth-benefits { width: 100%; margin-bottom: 0; padding: 0 24px 40px; grid-template-columns: 1fr; background: #fff; }
  .auth-benefit { min-height: 0; padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--ds-line); }
  .auth-benefit:last-child { border-bottom: 0; }
  .member-home { padding: 16px; background: var(--ds-bg); }
  .member-hero { min-height: 300px; padding: 32px 24px; border-radius: 18px; }
  .member-hero h1 { font-size: 36px; }
  .workspace-heading { margin-top: 34px; }
  .workspace-heading h2 { font-size: 24px; }
  .workspace-heading > span { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }
  .launch-card { min-height: 270px; padding: 24px; }
  .launch-card h3 { max-width: 170px; font-size: 24px; }
  .launch-card p { max-width: 150px; }
  .launch-visual { right: 20px; bottom: 52px; width: 125px; height: 125px; transform: rotate(2deg); transform-origin: right bottom; }
  .member-secondary { grid-template-columns: 1fr; }
  .join-aside { padding: 34px 24px; }
  .join-aside h1 { font-size: 38px; }
  .join-steps { margin-top: 30px; grid-template-columns: 1fr; gap: 16px; }
  .join-steps li { min-height: 40px; padding: 0 0 0 54px; }
  .join-card { padding: 38px 24px 52px; }
  .join-card h2 { font-size: 30px; }
  .join-card .row { grid-template-columns: minmax(0,1fr) 112px; }
  .join-card .row button { min-width: 0; padding: 0 8px; }
  .account-page .wrap { padding: 16px; background: var(--ds-bg); }
  .account-hero { padding: 30px 22px; align-items: flex-start; flex-direction: column; border-radius: 18px; }
  .account-hero h1 { font-size: 32px; }
  .account-page #content .card { padding: 20px 16px; }
  .account-page .tpls { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .account-page .tpl .pv { height: 170px; }
  .account-page table.list { min-width: 640px; }
  .ftr { display: none; }
}

@media (max-width: 390px) {
  .auth-story h1,
  .join-aside h1 { font-size: 34px; }
  .account-page .tpls { grid-template-columns: 1fr; }
}
