/* WebOS SSG V2 - Knowledge Group */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.75;
  color: #1f2937;
  background: #f2f4f8;
  background-image: var(--webos-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: var(--webos-bg-overlay, linear-gradient(180deg, rgba(248,250,252,.56), rgba(241,245,249,.72)));
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 18px; }

.kz-header {
  background: transparent;
  color: #111827;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}
.kz-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 12px 30px rgba(15,23,42,0.1);
}
.kz-brand { flex: 0 0 auto; min-width: 0; }
.kz-brand-link { display: inline-flex; align-items: center; gap: 8px; color: #111827; font-weight: 800; }
.kz-logo { height: 38px; width: auto; object-fit: contain; }
.kz-site-title { font-size: 1.45rem; letter-spacing: -0.4px; max-width:min(42vw,560px); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kz-site-subtitle { color: #6b7280; font-size: 0.78rem; margin-top: 2px; }
.kz-header .webos-widget-nav { flex: 1 1 auto; min-width: 0; margin-bottom: 0 !important; }

.kz-banner { margin: 12px auto 8px; }
.kz-banner img { width: 100%; border-radius: 12px; max-height: 220px; object-fit: cover; box-shadow: 0 6px 20px rgba(15,23,42,0.12); }
.main-content { padding: 18px 0 52px; }

.kz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.kz-layout-post { gap: 20px; }
.kz-main > [data-webos-widget],
.kz-side > [data-webos-widget] { margin-bottom: 16px; }
.kz-main > [data-webos-widget]:last-child,
.kz-side > [data-webos-widget]:last-child { margin-bottom: 0; }

.kz-side {
  position: sticky;
  top: 92px;
}
.kz-side > [data-webos-widget] {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(15,23,42,0.08);
  backdrop-filter: blur(10px) saturate(1.1);
}

.kz-search-wrap {
  max-width: 920px;
  margin: 0 auto;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  backdrop-filter: blur(10px) saturate(1.1);
}
.kz-search-wrap h2 { font-size: 1.2rem; color: #111827; margin-bottom: 10px; }
.kz-search-status { color: #6b7280; margin-bottom: 12px; }
.kz-search-list { display: flex; flex-direction: column; gap: 10px; }
.kz-search-item { display: block; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; }
.kz-search-item-title { font-size: 1rem; font-weight: 700; color: #111827; line-height: 1.45; margin-bottom: 4px; }
.kz-search-item-meta { font-size: 0.78rem; color: #64748b; margin-bottom: 4px; }
.kz-search-item-excerpt { font-size: 0.86rem; color: #475569; line-height: 1.55; }
.kz-search-empty { color: #94a3b8; text-align: center; padding: 20px 0 10px; }
.kz-archive-month-nav {
  margin: 0 0 14px 0;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 12px;
  padding: 12px;
  backdrop-filter: blur(10px) saturate(1.1);
}
.kz-archive-month-nav h3 {
  margin: 0 0 10px 0;
  font-size: 0.98rem;
  color: #111827;
}
.kz-archive-month-links {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.kz-archive-month-links a {
  display:inline-flex;
  align-items:center;
  gap:4px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  padding:5px 10px;
  font-size:0.82rem;
  font-weight:600;
}
.kz-archive-month-links a span { color:#64748b; font-weight:500; }

.webos-mobile-widget-toggle {
  display: none;
  width: 100%;
  border: none;
  background: transparent;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
}
.webos-mobile-widget-toggle .caret { color:#64748b; transition: transform .2s ease; }
.webos-mobile-widget-body { padding: 0; }
.webos-mobile-widget.is-open .webos-mobile-widget-toggle .caret { transform: rotate(180deg); }

.kz-footer {
  background: rgba(15,23,42,0.8);
  backdrop-filter: blur(12px) saturate(1.08);
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1;
  font-size: 0.84rem;
  text-align: center;
  padding: 26px 16px;
}


.kz-layout-dense .kz-main .webos-widget-recent-posts .webos-post-list-item{padding:10px 0}
.kz-layout-dense .kz-main .webos-widget-recent-posts h3{margin-bottom:10px}


@media (min-width: 1600px) {
  .container { max-width: 1500px; }
  .kz-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; }
}
@media (max-width: 1160px) {
  .kz-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 980px) {
  .kz-header-inner { flex-wrap: wrap; align-items: flex-start; padding: 10px 0; }
  .kz-brand { width: 100%; }
  .kz-layout { grid-template-columns: 1fr; }
  .kz-side { position: static; top: auto; }
}
@media (max-width: 768px) {
  body { background-attachment: scroll; }
  .kz-side { display: grid; gap: 10px; }
  .kz-side > [data-webos-widget] { margin-bottom: 0 !important; padding: 0 !important; overflow: hidden; }
  .webos-mobile-widget-toggle { display: flex; border-bottom: 1px solid #e5e7eb; }
  .webos-mobile-widget:not(.is-open) .webos-mobile-widget-body { display: none; }
  .webos-mobile-widget.is-open .webos-mobile-widget-body { display: block; padding: 10px 12px 12px; }
}
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .main-content { padding: 12px 0 36px; }
  .kz-site-title { font-size: 1.2rem; }
  .kz-site-subtitle { display: none; }
}
