/*
 * TXX.KR — Google Blog Design System
 */

/* ================================================
   FONT: Noto Sans KR (Google Korean Font)
   - 3 weights only for performance
   - font-display=swap → no FOIT
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

/* ================================================
   DESIGN TOKENS
   ================================================ */
:root {
  --g-blue:       #1a73e8;
  --g-blue-dark:  #1557b0;
  --g-blue-light: #e8f0fe;
  --g-text:       #202124;
  --g-text-2:     #5f6368;
  --g-text-3:     #9aa0a6;
  --g-surface:    #ffffff;
  --g-bg:         #f8f9fa;
  --g-border:     #e8eaed;
  --g-hover:      #f1f3f4;
  --g-shadow-1:   0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  --g-shadow-2:   0 2px 6px 2px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.3);
  --g-radius:     16px;
  --g-radius-sm:  8px;
  --g-chip-r:     100px;
}

/* ================================================
   BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  font-family: 'Noto Sans KR', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--g-bg);
  color: var(--g-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* ================================================
   NAV — Google Blog Style
   ================================================ */
.g-nav {
  background: var(--g-surface);
  border-bottom: 1px solid var(--g-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
}
.g-nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.g-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--g-blue);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  margin-right: 8px;
}
.g-logo:hover { color: var(--g-blue-dark); }

/* scrollable horizontal nav links */
.g-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.g-nav-links::-webkit-scrollbar { display: none; }

.g-nav-link {
  padding: 10px 14px;
  border-radius: var(--g-chip-r);
  font-size: 14px;
  font-weight: 500;
  color: var(--g-text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.g-nav-link:hover {
  background: var(--g-hover);
  color: var(--g-text);
}
.g-nav-link.active { color: var(--g-blue); }

.g-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g-text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.g-icon-btn:hover { background: var(--g-hover); color: var(--g-text); }
.g-icon-btn svg { width: 20px; height: 20px; }

/* ================================================
   LAYOUT
   ================================================ */
.g-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  min-height: calc(100vh - 64px - 88px);
}

@media (max-width: 640px) {
  .g-main { padding: 20px 16px 48px; }
  .g-nav-inner { padding: 0 16px; }
}

/* ================================================
   CARD — Google Blog Card
   ================================================ */
.g-card {
  background: var(--g-surface);
  border-radius: var(--g-radius);
  overflow: hidden;
  box-shadow: var(--g-shadow-1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.g-card:hover {
  box-shadow: var(--g-shadow-2);
}

/* Featured card — horizontal layout on desktop */
.g-card-featured {
  background: var(--g-surface);
  border-radius: var(--g-radius);
  overflow: hidden;
  box-shadow: var(--g-shadow-1);
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .g-card-featured { flex-direction: row; min-height: 320px; }
  .g-card-featured .feat-image { width: 55%; }
  .g-card-featured .feat-content { width: 45%; }
}
.g-card-featured:hover { box-shadow: var(--g-shadow-2); }

.feat-image {
  overflow: hidden;
  background: #f1f3f4;
  position: relative;
}
.feat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.g-card-featured:hover .feat-image img { transform: scale(1.04); }

.feat-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #c5d8fd 100%);
}

.feat-content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
@media (max-width: 767px) {
  .feat-content { padding: 20px; }
}

/* ================================================
   CHIP — Category Label
   ================================================ */
.g-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--g-chip-r);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--g-blue-light);
  color: var(--g-blue);
  text-decoration: none;
  transition: background 0.15s;
}
.g-chip:hover { background: #d2e3fc; }

/* ================================================
   GRID
   ================================================ */
.g-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 540px)  { .g-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .g-grid { grid-template-columns: repeat(3, 1fr); } }

.g-grid-card {
  background: var(--g-surface);
  border-radius: var(--g-radius);
  overflow: hidden;
  box-shadow: var(--g-shadow-1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.g-grid-card:hover { box-shadow: var(--g-shadow-2); transform: translateY(-2px); }

.g-grid-card .card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f1f3f4;
  flex-shrink: 0;
}
.g-grid-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.g-grid-card:hover .card-image img { transform: scale(1.05); }

.g-grid-card .card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #c5d8fd 100%);
  aspect-ratio: 16/9;
}

.g-grid-card .card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.g-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--g-text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.g-grid-card:hover .g-card-title { color: var(--g-blue); }

.g-card-meta {
  font-size: 12px;
  color: var(--g-text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ================================================
   PAGINATION — Google Style
   ================================================ */
nav[aria-label="페이지네이션"] {
  margin-top: 48px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination em,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
  color: var(--g-text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-style: normal;
}
.pagination a:hover { background: var(--g-hover); color: var(--g-text); }
.pagination .current,
.pagination .current em {
  background: var(--g-blue) !important;
  color: white !important;
  border-radius: 50%;
}
.pagination .disabled,
.pagination .disabled span { opacity: 0.38; pointer-events: none; }
.pagination .gap span { background: none !important; }

/* ================================================
   ARTICLE — Post Show Page
   ================================================ */
.g-article-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.g-breadcrumb {
  font-size: 13px;
  color: var(--g-text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.g-breadcrumb a {
  color: var(--g-text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.g-breadcrumb a:hover { color: var(--g-blue); }
.g-breadcrumb .sep { color: var(--g-border); }
.g-breadcrumb .current { color: var(--g-text-2); }

.g-post-header {
  margin-bottom: 32px;
}
.g-post-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.g-post-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--g-text);
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 0 0 20px 0;
  word-break: keep-all;
}
.g-post-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--g-text-2);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--g-border);
  margin-bottom: 24px;
}
.g-post-info span { display: flex; align-items: center; gap: 4px; }

.g-post-hero {
  border-radius: var(--g-radius);
  overflow: hidden;
  margin-bottom: 32px;
  background: #f1f3f4;
}
.g-post-hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

.g-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.g-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--g-chip-r);
  font-size: 12px;
  font-weight: 500;
  background: var(--g-hover);
  color: var(--g-text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.g-tag:hover { background: var(--g-border); color: var(--g-text); }

/* ================================================
   AUTHOR BIO
   ================================================ */
.g-author-bio {
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  padding: 24px;
  margin-top: 40px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.g-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--g-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ================================================
   RELATED POSTS
   ================================================ */
.g-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .g-related-grid { grid-template-columns: 1fr; }
}
.g-related-card {
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius-sm);
  padding: 16px;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  display: block;
}
.g-related-card:hover { background: var(--g-hover); box-shadow: var(--g-shadow-1); }
.g-related-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--g-text);
  line-height: 1.5;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.g-related-card .g-card-meta { font-size: 12px; }

/* ================================================
   COMMENT FORM
   ================================================ */
.g-comment-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius-sm);
  font-family: inherit;
  font-size: 16px; /* 16px 미만이면 iOS Safari에서 자동 줌 발생 */
  color: var(--g-text);
  background: var(--g-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.g-comment-input:focus {
  border-color: var(--g-blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.g-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--g-blue);
  color: white;
  border: none;
  border-radius: var(--g-chip-r);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
}
.g-btn-primary:hover { background: var(--g-blue-dark); box-shadow: var(--g-shadow-1); }
.g-btn-primary:disabled { background: var(--g-border); color: var(--g-text-3); cursor: not-allowed; }
.g-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--g-blue);
  border: 1px solid var(--g-blue);
  border-radius: var(--g-chip-r);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.g-btn-secondary:hover { background: var(--g-blue-light); }

/* ================================================
   SEARCH
   ================================================ */
.g-search-wrap {
  max-width: 680px;
  margin: 0 auto 40px;
}
.g-search-form {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--g-border);
  border-radius: var(--g-chip-r);
  padding: 4px 4px 4px 20px;
  box-shadow: var(--g-shadow-1);
  transition: box-shadow 0.2s;
}
.g-search-form:focus-within {
  box-shadow: 0 0 0 3px rgba(26,115,232,.15), var(--g-shadow-1);
  border-color: var(--g-blue);
}
.g-search-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
  color: var(--g-text);
  padding: 8px 0;
}
.g-search-form button {
  padding: 10px 24px;
  background: var(--g-blue);
  color: white;
  border: none;
  border-radius: var(--g-chip-r);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.g-search-form button:hover { background: var(--g-blue-dark); }

/* ================================================
   MOBILE GLOBAL — Touch & Scroll UX
   ================================================ */

/* 300ms tap delay 제거 (모든 인터랙티브 요소) */
a, button, input, select, textarea, label {
  touch-action: manipulation;
}

/* iOS Safari 탭 하이라이트 제거 */
a, button {
  -webkit-tap-highlight-color: transparent;
}

/* iOS 스크롤 관성 */
.g-nav-links {
  -webkit-overflow-scrolling: touch;
}

/* 모바일에서 텍스트 선택 방지 (카드 이미지) */
.g-grid-card .card-image,
.g-card-featured .feat-image {
  -webkit-user-select: none;
  user-select: none;
}

/* 안전 영역 (iPhone notch/Dynamic Island) */
.g-nav {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.g-footer {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

/* ================================================
   FOOTER
   ================================================ */
.g-footer {
  background: var(--g-surface);
  border-top: 1px solid var(--g-border);
  padding: 28px 24px;
}
.g-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--g-text-3);
}
.g-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.g-footer-links a {
  color: var(--g-text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.g-footer-links a:hover { color: var(--g-blue); }

/* ================================================
   TOC — Table of Contents
   ================================================ */
.toc-wrap {
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius-sm);
  padding: 18px 24px;
  margin-bottom: 32px;
  font-size: 14px;
}
.toc-wrap .toc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--g-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px 0;
}

/* ================================================
   FLASH MESSAGES
   ================================================ */
.g-flash-success {
  background: #e6f4ea;
  border-bottom: 1px solid #ceead6;
  padding: 12px 24px;
  font-size: 14px;
  color: #137333;
}
.g-flash-alert {
  background: #fce8e6;
  border-bottom: 1px solid #f5c6c2;
  padding: 12px 24px;
  font-size: 14px;
  color: #c5221f;
}

/* ================================================
   PROSE TYPOGRAPHY — Article Content
   ================================================ */
.prose,
.prose-lg {
  font-family: 'Noto Sans KR', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.8;
  color: #374151;
}

.prose p {
  margin-bottom: 1.75em;
  line-height: 1.85;
  color: #374151;
  font-size: 1.05rem;
  word-break: keep-all;
  letter-spacing: -0.01em;
}
.prose-lg p { font-size: 1.1rem; line-height: 1.9; }

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.3;
  word-break: keep-all;
}
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  color: #111827;
  margin-top: 3em;
  margin-bottom: 1.25em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #e5e7eb;
}
.prose h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: #1f2937;
  margin-top: 2.5em;
  margin-bottom: 1em;
}
.prose h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #374151;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.prose thead { background: linear-gradient(135deg, #1e40af, #3b82f6); color: white; }
.prose thead th {
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.prose tbody tr { border-bottom: 1px solid #e5e7eb; transition: background 0.15s; }
.prose tbody tr:nth-child(even) { background: #f9fafb; }
.prose tbody tr:hover { background: #eff6ff; }
.prose tbody td { padding: 10px 16px; color: #374151; line-height: 1.5; }

.prose ul { list-style-type: disc; padding-left: 1.75em; margin: 1em 0 1.75em; }
.prose ol { list-style-type: decimal; padding-left: 1.75em; margin: 1em 0 1.75em; }
.prose li { margin-bottom: 0.75em; line-height: 1.8; color: #374151; padding-left: 0.25em; }
.prose li>ul, .prose li>ol { margin-top: 0.5em; margin-bottom: 0.5em; }

.prose blockquote {
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  padding: 1.25em 1.5em;
  margin: 2em 0;
  border-radius: 0 8px 8px 0;
  color: #1e40af;
  font-style: normal;
}
.prose blockquote p { margin-bottom: 0.5em; color: #1e40af; }
.prose blockquote p:last-child { margin-bottom: 0; }

.prose strong { font-weight: 700; color: #111827; }

.prose code {
  background: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: #dc2626;
  font-family: 'Menlo','Monaco','Courier New',monospace;
}
.prose pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1.25em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2em 0;
  line-height: 1.6;
  border: 1px solid #374151;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: 0.9em; }

.prose hr { border: none; border-top: 2px solid #e5e7eb; margin: 3em 0; }

.prose a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #93c5fd;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.prose a:hover { color: #1d4ed8; text-decoration-color: #2563eb; }

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2em 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

@media (max-width: 768px) {
  .prose p { font-size: 1rem; line-height: 1.8; margin-bottom: 1.5em; }
  .prose h2 { font-size: 1.3rem; margin-top: 2.5em; margin-bottom: 1em; }
  .prose h3 { font-size: 1.15rem; margin-top: 2em; }
  .prose table { font-size: 0.85rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose thead th { padding: 10px 12px; }
  .prose tbody td { padding: 8px 12px; }
  .prose blockquote { padding: 1em 1.25em; }
  .prose ul, .prose ol { padding-left: 1.5em; }
}

/* ================================================
   AD BANNERS
   ================================================ */
.ad-banner-container { margin: 3em 0; }
.ad-banner {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.ad-banner .ad-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 2px 8px;
  background: #e9ecef;
  border-radius: 4px;
}
.ad-banner .ad-content {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .ad-banner-container { margin: 2em 0; }
  .ad-banner { padding: 12px; }
  .ad-banner .ad-content { min-height: 70px; }
}

/* ================================================
   CATEGORY PAGE
   ================================================ */
.g-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (min-width: 768px) { .g-category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .g-category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 400px) { .g-category-grid { grid-template-columns: 1fr; } }

.g-category-card {
  border-radius: var(--g-radius);
  padding: 24px 20px;
  color: white;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.g-category-card:hover { transform: translateY(-4px); box-shadow: var(--g-shadow-2); }
.g-category-card .cat-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.g-category-card .cat-name { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.g-category-card .cat-count { font-size: 13px; opacity: 0.82; }

/* ================================================
   UTILITY
   ================================================ */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Flash messages in post comments */
.flash-success { background: #e6f4ea; border: 1px solid #ceead6; border-radius: 8px; padding: 12px 16px; color: #137333; font-size: 14px; margin-bottom: 16px; }
.flash-alert   { background: #fce8e6; border: 1px solid #f5c6c2; border-radius: 8px; padding: 12px 16px; color: #c5221f; font-size: 14px; margin-bottom: 16px; }
