/* BLUEDEERS — logo palette: ice cyan → ocean blue → deep navy */
:root {
  --cyan: #12b8f3;
  --sky: #5fd0f5;
  --ocean: #1a73b8;
  --blue: #0f5aa8;
  --navy: #0d3b7a;
  --ink: #0b2447;
  --text: #2b3c55;
  --muted: #6b7c93;
  --line: #e1ebf5;
  --bg: #ffffff;
  --bg-soft: #f3f9fe;
  --bg-tint: #eaf5fd;
  --grad: linear-gradient(135deg, #12b8f3 0%, #0f5aa8 58%, #0d3b7a 100%);
  --grad-soft: linear-gradient(135deg, #e8f7ff 0%, #f6fbff 100%);
  --ok: #138a5b;
  --danger: #c93b4a;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(13, 59, 122, .25);
  --shadow-sm: 0 2px 10px -2px rgba(13, 59, 122, .12);
  --font: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Montserrat', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.7; font-size: 16px; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand span {
  font-family: var(--font-brand); font-weight: 800; font-size: 1.2rem; letter-spacing: .08em; color: var(--navy);
}
.brand:hover { color: var(--navy); }
.nav-menu { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--text); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { background: var(--bg-tint); color: var(--blue); }
.nav-links a.active { color: var(--blue); background: var(--bg-tint); font-weight: 700; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user .who { font-size: .9rem; color: var(--muted); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .95rem; padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(15, 90, 168, .65); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 24px -8px rgba(15, 90, 168, .75); }
.btn-ghost { background: #fff; color: var(--blue); border-color: #bcd9ef; }
.btn-ghost:hover { background: var(--bg-tint); color: var(--navy); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c4ca; }
.btn-danger:hover { background: #fdf0f1; color: var(--danger); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { color: var(--blue); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }

label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin: 0 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #cfe0ef;
  border-radius: 12px; padding: 11px 14px; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(18, 184, 243, .15); }
textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.field { margin-bottom: 18px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

.alert { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; font-size: .95rem; border: 1px solid; }
.alert-ok { background: #ecf9f3; color: #0e6f49; border-color: #bfe6d3; }
.alert-error { background: #fdf0f1; color: #a52a38; border-color: #f2c7cc; }
.flash-wrap { padding-top: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1000px 500px at 85% 20%, #dff4ff 0%, rgba(255,255,255,0) 60%), linear-gradient(180deg, #f6fbff 0%, #fff 100%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.hero::before { width: 380px; height: 380px; background: #7fd8f7; top: -120px; right: 8%; }
.hero::after { width: 300px; height: 300px; background: #b9dcf7; bottom: -140px; left: -80px; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding: 84px 0 92px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-brand); font-weight: 700; font-size: .78rem;
  letter-spacing: .18em; color: var(--ocean); background: #fff; border: 1px solid #cfe6f6; padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(18,184,243,.2); }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 20px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--text); max-width: 520px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 440px; }
.hero-art .orb {
  position: absolute; width: min(430px, 90%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d8f1ff 45%, #a9defa 100%);
  box-shadow: inset 0 0 60px rgba(255,255,255,.9), 0 30px 80px -30px rgba(15, 90, 168, .5);
}
.hero-art .ring { position: absolute; width: min(500px, 100%); aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed #a7d4f0; animation: spin 60s linear infinite; }
.hero-art img { position: relative; width: min(280px, 62%); filter: drop-shadow(0 18px 24px rgba(13, 59, 122, .28)); animation: float 6s ease-in-out infinite; }
.spark { position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 5px rgba(95,208,245,.4), 0 0 20px 6px rgba(95,208,245,.7); animation: twinkle 3s ease-in-out infinite; }
.spark.s1 { top: 14%; right: 18%; } .spark.s2 { top: 52%; left: 8%; animation-delay: 1s; transform: scale(.7); } .spark.s3 { bottom: 12%; right: 10%; animation-delay: 2s; transform: scale(.55); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { font-family: var(--font-brand); font-weight: 700; font-size: .8rem; letter-spacing: .2em; color: var(--cyan); text-transform: uppercase; margin-bottom: 10px; display: block; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #bfe0f5; }
.icon-badge { width: 52px; height: 52px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 10px 20px -10px rgba(15,90,168,.7); }
.icon-badge svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.card ul li { margin-bottom: 4px; }

.steps { counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-brand); font-weight: 800; font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 6px; }
.step h3 { font-size: 1.05rem; } .step p { color: var(--muted); font-size: .92rem; margin: 0; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-tint); color: var(--blue); letter-spacing: .02em; }
.badge.planned { background: #eef2f7; color: #5b6b82; }
.badge.dev { background: #fff4de; color: #9a6400; }
.badge.released { background: #e2f6ec; color: #0e7a50; }
.badge.notice { background: var(--grad); color: #fff; }
.badge.answered { background: #e2f6ec; color: #0e7a50; }
.badge.admin { background: var(--navy); color: #fff; }
.badge.hidden { background: #fdecee; color: #a52a38; }

.empty { text-align: center; padding: 56px 24px; border: 2px dashed #bcd9ef; border-radius: var(--radius); background: var(--grad-soft); }
.empty img { width: 70px; opacity: .85; margin-bottom: 12px; }
.empty h3 { margin-bottom: 6px; } .empty p { color: var(--muted); margin: 0; }

.cta-band { background: var(--grad); color: #fff; border-radius: 24px; padding: 52px 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.1); }
.cta-band h2 { color: #fff; font-size: 1.7rem; margin-bottom: 6px; } .cta-band p { margin: 0; opacity: .88; }
.cta-band > * { position: relative; z-index: 1; }

.page-hero { background: var(--grad-soft); border-bottom: 1px solid var(--line); padding: 56px 0 44px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; margin-bottom: 8px; }
.page-hero p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.page-body { padding: 44px 0 80px; }

/* ---------- Board ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 500; border: 1px solid #cfe0ef; color: var(--text); background: #fff; }
.chip:hover { border-color: var(--cyan); color: var(--blue); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.search { display: flex; gap: 8px; } .search input { width: 220px; padding: 8px 14px; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; }
.board th { background: var(--bg-soft); color: var(--ink); font-size: .85rem; font-weight: 700; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: .94rem; vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.board tbody tr:hover td { background: #fafdff; }
.board td.title a { color: var(--ink); font-weight: 500; }
.board td.title a:hover { color: var(--blue); }
.board tr.pinned td { background: #f5fbff; }
.board .num, .board .nowrap { white-space: nowrap; color: var(--muted); font-size: .88rem; }
.cmt-count { color: var(--cyan); font-weight: 700; font-size: .85rem; margin-left: 6px; }
.empty-row td { text-align: center; color: var(--muted); padding: 48px 16px !important; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: .9rem; padding: 0 10px; }
.pager a:hover { border-color: var(--cyan); color: var(--blue); }
.pager .cur { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; }

.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.post-head { padding: 28px 32px 20px; border-bottom: 1px solid var(--line); }
.post-head h1 { font-size: 1.55rem; margin: 10px 0 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .88rem; align-items: center; }
.post-body { padding: 28px 32px 36px; white-space: pre-wrap; word-break: break-word; color: var(--ink); min-height: 140px; }
.post-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 32px 24px; flex-wrap: wrap; }
.comments { margin-top: 32px; }
.comments h2 { font-size: 1.15rem; }
.comment { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
.comment.by-admin { border-color: #9fd6f3; background: linear-gradient(180deg, #f3fbff, #fff); box-shadow: inset 4px 0 0 var(--cyan); }
.comment .meta { margin-bottom: 8px; }
.comment .body { white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.comment form { display: inline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--danger); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.auth-wrap { min-height: 60vh; display: grid; place-items: center; padding: 56px 0; background: var(--grad-soft); }
.auth-card { width: min(430px, 100% - 40px); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.auth-card .logo { display: block; width: 54px; margin: 0 auto 14px; }
.auth-card h1 { text-align: center; font-size: 1.4rem; margin-bottom: 22px; }
.auth-card .btn { width: 100%; }
.auth-sub { text-align: center; margin-top: 18px; font-size: .92rem; color: var(--muted); }

.program-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.program-card h3 { font-size: 1.25rem; }
.program-card .tag { color: var(--muted); }
.prose { white-space: pre-wrap; word-break: break-word; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: #0a2a57; color: #b7cbe6; padding: 48px 0 28px; margin-top: auto; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer .brand span { color: #fff; }
.site-footer .brand img { background: #fff; border-radius: 10px; padding: 3px; }
.site-footer p { margin: 12px 0 0; font-size: .9rem; max-width: 340px; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #b7cbe6; } .site-footer a:hover { color: var(--sky); }
.copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Admin ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 36px 0 80px; align-items: start; }
.admin-side { position: sticky; top: 88px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.admin-side h4 { font-size: .75rem; letter-spacing: .14em; color: var(--muted); padding: 8px 12px 6px; margin: 0; font-family: var(--font-brand); }
.admin-side a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: .94rem; }
.admin-side a:hover { background: var(--bg-tint); }
.admin-side a.on { background: var(--grad); color: #fff; }
.pill { background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 8px; font-weight: 700; }
.admin-main h1 { font-size: 1.6rem; margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--font-brand); font-size: 2rem; color: var(--navy); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .86rem; }
.stat.warn b { color: var(--danger); }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.bulk select { width: auto; padding: 7px 12px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inq { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
.inq.unread { border-left: 4px solid var(--cyan); }
.inq .msg { white-space: pre-wrap; word-break: break-word; margin: 10px 0 12px; color: var(--ink); }

.error-page { text-align: center; padding: 110px 0; }
.error-page .code { font-family: var(--font-brand); font-weight: 800; font-size: 6rem; line-height: 1; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 64px; text-align: center; }
  .hero p.lead { margin-inline: auto; } .hero-cta { justify-content: center; }
  .hero-art { min-height: 340px; order: -1; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; flex-wrap: wrap; gap: 4px; } .admin-side h4 { display: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu { display: none; position: absolute; left: 0; right: 0; top: 68px; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 18px; flex-direction: column; align-items: stretch; gap: 10px; box-shadow: var(--shadow); }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; }
  .nav-user { justify-content: space-between; flex-wrap: wrap; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 24px; }
  .post-head, .post-body { padding-inline: 20px; } .post-actions { padding-inline: 20px; }
  .form-card { padding: 22px; }
  .search input { width: 100%; } .search { flex: 1; }
  .col-hide { display: none; }
}
