/* =====================================================================
 * 다같이 — 대회 팀원 찾기 (패밀리 그린 테마: 제자리·한눈에와 동일 언어)
 * ===================================================================== */
:root {
  --navy: #0e4d2e; --navy-dark: #093a22; --accent: #14a058;
  --bg: #f4f6fa; --card: #ffffff; --text: #1f2733; --muted: #6b7686;
  --line: #e2e6ee; --soon: #d6363b; --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 40, 80, 0.06);
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; font-family: "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.req { color: var(--soon); font-weight: 700; font-size: 0.7rem; background: #fdeaea; padding: 1px 6px; border-radius: 6px; }
.cap { display: flex; align-items: center; gap: 6px; }
.hidden { display: none !important; }

/* 헤더 */
header.site { background: var(--navy); color: #fff; }
header.site .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand small { display: block; font-size: 0.72rem; font-weight: 400; opacity: 0.8; }
.sitenav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sitenav a.cross-link { background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 0.92rem; font-weight: 400; padding: 5px 12px; border-radius: 999px; }
.sitenav a.cross-link:hover { background: rgba(255, 255, 255, 0.28); }

/* 히어로 */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: #e9f4ee; padding: 22px 0 26px; }
.beta { display: inline-block; vertical-align: middle; position: relative; top: -1px; margin-left: 2px; background: rgba(255, 255, 255, 0.22); color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 999px; }
.hero h1 { margin: 0 0 6px; font-size: 1.5rem; }
.hero p { margin: 0; opacity: 0.9; font-size: 0.95rem; }

/* 버튼 */
.btn { display: inline-block; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 10px 16px; font-size: 0.92rem; cursor: pointer; font-weight: 700; font-family: inherit; }
.btn:hover { filter: brightness(0.93); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.link-btn { background: transparent; border: none; color: var(--muted); font-size: 0.82rem; cursor: pointer; padding: 4px; font-family: inherit; }
.link-btn:hover { color: var(--soon); text-decoration: underline; }

/* 내 정보 페이지 (profile.html) */
.container.narrow { max-width: 480px; }
.prof-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; margin: 24px 0; }
.prof-page h1 { margin: 0 0 8px; font-size: 1.3rem; color: var(--navy); }
.prof-lead { margin: 0 0 18px; font-size: 0.9rem; color: var(--muted); line-height: 1.6; word-break: keep-all; }
.prof-form { display: flex; flex-direction: column; gap: 14px; }
.prof-form label { font-size: 0.88rem; font-weight: 700; display: flex; flex-direction: column; gap: 5px; }
.prof-form input, .prof-form select { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.98rem; background: #fff; }
.prof-form input:focus, .prof-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #cfeadd; }
.prof-form .btn { margin-top: 4px; padding: 12px; font-size: 0.98rem; }
.prof-note { margin: 6px 0 0; font-size: 0.78rem; text-align: center; }
@media (max-width: 480px) { .prof-form input, .prof-form select { font-size: 16px; } }

/* 보드 */
.board-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 16px 0 12px; }
.board-label { font-weight: 700; color: var(--navy); font-size: 1rem; flex: 1; min-width: 0; word-break: keep-all; line-height: 1.4; }
.board-back { white-space: nowrap; flex-shrink: 0; padding-top: 2px; }
.write-toggle { width: 100%; margin-bottom: 14px; }

.post-form { background: var(--card); border: 1px solid #cfe7d8; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.post-form label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.post-form input, .post-form textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.95rem; resize: vertical; }
.post-form input:focus, .post-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #cfeadd; }
.post-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* 팀 글 목록 */
.team-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; }
.team-post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.team-post-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.post-who { font-size: 0.8rem; font-weight: 700; color: var(--navy); background: #e6f4ec; padding: 2px 9px; border-radius: 999px; }
.team-post-role { font-weight: 700; font-size: 1rem; }
.team-post-detail { margin-top: 4px; font-size: 0.88rem; color: var(--text); white-space: pre-wrap; }
.team-post-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.board-empty { padding: 40px 0; line-height: 1.7; }

/* 허브 */
.hub { padding: 16px 0 36px; }
.hub-cta { margin-bottom: 6px; }
.hub-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 22px; text-align: center; margin: 4px 0; }
.hub-emoji { font-size: 34px; }
.hub-card p { color: var(--muted); margin: 10px 0 18px; line-height: 1.6; word-break: keep-all; }
.hub-h { font-size: 1.05rem; margin: 24px 0 12px; }
.hub-list { display: flex; flex-direction: column; gap: 8px; }
.hub-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; box-shadow: var(--shadow); }
.hub-item:hover { border-color: var(--accent); }
.hub-name { font-weight: 700; color: var(--text); }
.hub-count { font-size: 0.82rem; font-weight: 700; color: var(--navy); background: #e6f4ec; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* 푸터 */
footer.site { margin-top: 20px; border-top: 1px solid var(--line); }
footer.site .container { padding: 18px 16px 30px; text-align: center; }
.foot-links a { color: var(--accent); font-weight: 600; }
.copyright { margin-top: 8px; font-size: 0.78rem; color: var(--muted); line-height: 1.7; }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px); background: var(--navy); color: #fff; font-weight: 600; font-size: 0.9rem; padding: 11px 18px; border-radius: 10px; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 480px) {
  header.site .container { justify-content: center; text-align: center; }
  .sitenav { width: 100%; justify-content: center; }
  .hero { text-align: center; padding: 12px 0 18px; }
  .hero h1 { font-size: 1.15rem; margin-bottom: 3px; }
  .hero p { font-size: 0.84rem; line-height: 1.5; }
  .profile-form input, .profile-form select, .post-form input, .post-form textarea { font-size: 16px; } /* iOS 자동확대 방지 */
}
