
:root {
  --background: #ffffff;
  --foreground: #18181b;
  --muted: #fafafa;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --card: #ffffff;
  --primary: #18181b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Malgun Gothic", system-ui, sans-serif;
  background: var(--muted);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 760px; padding-top: 48px; padding-bottom: 80px; }

/* Hero */
.hero {
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  padding: 64px 0 40px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 12px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero-sub {
  color: var(--muted-foreground);
  font-size: 15px;
  margin: 0 0 16px;
  white-space: nowrap;
}
.updated { color: var(--muted-foreground); font-size: 13px; margin: 0; }

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.toolbar { display: flex; gap: 10px; flex-shrink: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  color: var(--foreground);
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: #f4f4f5; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: #27272a; }
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: #18181b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Card grid (index) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 40px 0 60px;
}
@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
}

.notice-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.notice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06), 0 16px 32px -12px rgba(0,0,0,0.12);
}
.notice-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notice-date { font-size: 12px; color: var(--muted-foreground); }
.notice-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}
.notice-summary {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notice-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 0;
  text-align: center;
  color: var(--muted-foreground);
  grid-column: 1 / -1;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}
.badge-tsherpa { background: #ecfeff; color: #0e7490; }
.badge-vivasam { background: #fef2f2; color: #b91c1c; }
.badge-iscream { background: #f0fdf4; color: #15803d; }
.badge-douclass { background: #fff7ed; color: #c2410c; }

/* Detail page */
.back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.back:hover { color: var(--foreground); }

.post-card, .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 16px;
}
.post-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 14px 0 4px;
}
.post-date { color: var(--muted-foreground); font-size: 13px; margin: 0 0 20px; }

.meta-grid {
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.meta-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
}
.meta-row dt { color: var(--muted-foreground); font-weight: 500; }
.meta-row dd { margin: 0; word-break: break-all; }
.meta-row a { color: #2563eb; text-decoration: none; }
.meta-row a:hover { text-decoration: underline; }

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
}
.analysis-block { margin-bottom: 24px; }
.analysis-block:last-child { margin-bottom: 0; }
.analysis-block h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  margin: 0 0 8px;
}
.analysis-block p { margin: 0; line-height: 1.7; font-size: 15px; }
.point-list { margin: 0; padding-left: 20px; line-height: 1.8; font-size: 14px; }
.point-list li { margin-bottom: 4px; }
.guide-block {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0;
}
.guide-block h3 { margin-bottom: 6px; }
.guide-block p { font-size: 14px; }
