:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --text: #222;
  --sub: #767678;
  --line: #e3e5e8;
  --bg: #f5f6f7;
  --card: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans KR", -apple-system, "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ===== 상단 헤더 ===== */
header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 20px 28px;
  text-align: center;
}

.logo {
  font-size: 32px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -1px;
}

.search-box {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 20px auto 0;
  border: 2px solid var(--blue);
  border-radius: 40px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
}

.search-box::after {
  content: "";
  margin-left: auto;
  width: 14px;
  height: 14px;
  border: 2.5px solid var(--blue);
  border-radius: 50%;
  flex-shrink: 0;
}

nav {
  border-top: 1px solid var(--line);
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
}

nav a {
  font-weight: 700;
  font-size: 15px;
}

nav a:hover { color: var(--blue); }

/* ===== 본문 ===== */
main {
  max-width: 1080px;
  margin: 24px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
}

.card-title span {
  font-size: 12px;
  font-weight: 400;
  color: var(--sub);
}

.card-body { padding: 20px; }

/* 프로필 카드 */
.profile { text-align: center; }

.profile img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.profile .name {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 700;
}

.profile .desc { color: var(--sub); }

.tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tags li {
  list-style: none;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #e8f0fe;
  color: var(--blue-dark);
  font-weight: 500;
}

.side,
.content { display: grid; gap: 20px; }

/* 리스트 */
.list { list-style: none; }

.list li + li { border-top: 1px solid var(--line); }

.list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  transition: background 0.15s;
}

.list a:hover { background: #fafafa; }
.list a:hover .item-title { text-decoration: underline; }

.icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  flex-shrink: 0;
}

.icon.gray { background: #444; }
.icon.orange { background: #ff7a00; }

.item-title { font-weight: 700; }
.item-sub { font-size: 12px; color: var(--sub); }

.arrow {
  margin-left: auto;
  color: #bbb;
  font-size: 18px;
}

/* 로그인 카드 */
.login-msg {
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 12px;
}

.login-btn {
  display: block;
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}

.login-btn:hover { background: var(--blue-dark); }

.login-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  list-style: none;
  font-size: 12px;
  color: var(--sub);
}

.login-links li + li::before {
  content: "|";
  margin-right: 8px;
  color: var(--line);
}

.login-links a:hover { color: var(--text); text-decoration: underline; }

/* ===== 로그인 · 회원가입 페이지 ===== */
.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 16px 40px;
}

.auth-logo {
  font-size: 36px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -1px;
  margin-bottom: 28px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
}

.auth-desc {
  margin: 4px 0 20px;
  font-size: 13px;
  color: var(--sub);
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.field .optional { color: var(--sub); font-weight: 400; }

.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  background: var(--card);
  color: var(--text);
}

.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; min-width: 0; }

.sub-btn {
  flex-shrink: 0;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--card);
  color: var(--blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sub-btn:hover { background: #e8f0fe; }

.check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 16px;
  font-size: 13px;
  color: var(--sub);
  cursor: pointer;
}

.check input { accent-color: var(--blue); width: 16px; height: 16px; }

.auth-msg {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: var(--blue-dark);
}

.auth-msg.error { color: #e53935; }

.auth-links { margin-top: 20px; }

.back {
  margin-top: 20px;
  font-size: 12px;
  color: var(--sub);
}

.back:hover { color: var(--text); }

/* ===== 푸터 ===== */
footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  text-align: center;
  padding: 24px 20px;
  color: var(--sub);
  font-size: 12px;
}

footer strong { color: var(--blue); }

@media (max-width: 760px) {
  main { grid-template-columns: 1fr; }
  .logo { font-size: 26px; }
  nav ul { gap: 20px; }
}
