﻿@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Noto+Sans+KR:wght@400;500;700;800&display=swap");

:root {
  --bg: #f3f6ff;
  --bg-2: #eef2ff;
  --panel: #ffffff;
  --panel-soft: #f7f9ff;
  --line: #d9e2ff;
  --text: #12203f;
  --muted: #5d6f99;
  --brand: #0f6fff;
  --brand-2: #00a2ff;
  --accent: #ff7a1a;
  --danger: #d53939;
  --ok: #1f9d63;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(17, 52, 119, 0.14);
  --font-display: "Space Grotesk", "Noto Sans KR", sans-serif;
  --font-ui: "Noto Sans KR", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(50rem 40rem at 85% -10%, #d9ecff 0%, transparent 60%),
    radial-gradient(45rem 30rem at -10% 20%, #e4ddff 0%, transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100%;
}

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

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(217, 226, 255, 0.9);
  background: rgba(243, 246, 255, 0.86);
  backdrop-filter: blur(14px);
}

.topbar-inner,
.container {
  width: min(1160px, 94vw);
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 0 0 4px rgba(15, 111, 255, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.18s ease;
}

.nav a:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.nav a.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.viewer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switch .tab {
  margin: 0;
}

.viewer-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

.container {
  padding: 26px 0 56px;
}

.hero {
  position: relative;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(40rem 20rem at 0% 0%, rgba(15, 111, 255, 0.13), transparent 60%),
    radial-gradient(32rem 20rem at 100% 100%, rgba(255, 122, 26, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
  padding: 22px;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
}

h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
}

h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
}

.lead,
.hint,
.meta {
  margin: 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.panel.alt {
  background: linear-gradient(180deg, #fff 0%, var(--panel-soft) 100%);
}

.stats-grid,
.grid-2,
.grid-3,
.board-grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.board-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.landing-side {
  position: sticky;
  top: 86px;
}

.hero-feed {
  padding: 26px;
}

.landing-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.kpi-card {
  border: 1px solid #d5e3ff;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #f9fcff 0%, #f2f7ff 100%);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hot-post-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hot-post-item {
  border: 1px solid #d6e4ff;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  display: grid;
  gap: 8px;
}

.hot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f6fff, #00a2ff);
  color: #fff;
  font-weight: 800;
}

.hot-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-family: var(--font-display);
}

.hot-preview {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.trust-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.trust-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #f9fbff;
  color: var(--muted);
  font-size: 13px;
}

.trust-item strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
}

.policy-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
  gap: 8px;
}

.policy-list li {
  border-left: 3px solid #0f6fff;
  padding-left: 10px;
  color: #2a477f;
  font-size: 14px;
}

.stat-card,
.board-card,
.post-item,
.comment-item,
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.board-card {
  display: grid;
  gap: 10px;
}

.board-meta {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #eff5ff;
  border: 1px solid #d9e5ff;
  color: #3e61b5;
  font-size: 12px;
  padding: 5px 10px;
}

.feed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  background: #f8faff;
}

.post-list,
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.post-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(11, 43, 103, 0.12);
}

.post-item a {
  display: grid;
  gap: 8px;
}

.feed-toolbar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 10px;
  margin: 12px 0;
}

.feed-search {
  width: 100%;
}

.feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-author {
  display: grid;
  gap: 2px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #1a3f88;
  border: 1px solid #c6d8ff;
  background: linear-gradient(180deg, #edf4ff, #dce9ff);
}

.feed-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.btn-sm {
  padding: 7px 11px;
  font-size: 12px;
}

.comment-item {
  background: #fbfcff;
}

.empty {
  border: 1px dashed #bfd0ff;
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  background: #f9fbff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-ui);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(15, 81, 177, 0.16);
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.btn-danger {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #d53939, #ff6a4a);
}

.btn-ghost {
  background: transparent;
}

label {
  display: block;
  margin: 6px 0;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(15, 111, 255, 0.32);
  outline-offset: 2px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

ul.row {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.stack {
  display: grid;
  gap: 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 8px 11px;
  font-size: 13px;
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
}

.tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.status {
  margin: 10px 0 0;
  font-size: 14px;
  color: #3d568d;
}

.status.is-error {
  color: var(--danger);
}

.gate {
  border: 1px solid #ffd29a;
  border-radius: 14px;
  background: #fff6e9;
  color: #87571f;
  padding: 14px;
  margin-bottom: 14px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.trend-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.trend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 10px;
  background: #fbfdff;
}

.trend-keyword {
  color: #2558bf;
  font-weight: 700;
}

.trend-item button {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.compose-preview {
  margin-top: 6px;
}

.compose-preview h3 {
  margin: 6px 0 8px;
}

#trace-canvas {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 1px dashed #9bb8ff;
  background: linear-gradient(180deg, #f6f9ff 0%, #f1f6ff 100%);
  touch-action: none;
}

.hidden {
  display: none !important;
}

.reveal {
  animation: revealUp 0.45s ease both;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid,
  .grid-2,
  .grid-3,
  .board-grid {
    grid-template-columns: 1fr;
  }

  .feed-toolbar {
    grid-template-columns: 1fr;
  }

  .feed-layout {
    grid-template-columns: 1fr;
  }

  .landing-layout {
    grid-template-columns: 1fr;
  }

  .landing-side {
    position: static;
    top: auto;
  }

  .landing-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: clamp(28px, 9vw, 44px);
  }
}
