:root {
  --ns-bg: #0c0f1a;
  --ns-bg-2: #111527;
  --ns-surface: #161b2e;
  --ns-surface-2: #1c2240;
  --ns-line: rgba(255,255,255,.08);
  --ns-line-strong: rgba(255,255,255,.15);
  --ns-text: #e2e8f0;
  --ns-muted: #64748b;
  --ns-accent: #00d4aa;
  --ns-accent-2: #6366f1;
  --ns-accent-3: #38bdf8;
  --ns-shadow: 0 4px 24px rgba(0,0,0,.3);
  --ns-wrap: 1260px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; background: var(--ns-bg); color: var(--ns-text); font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--ns-accent); text-decoration: none; transition: .2s ease; }
a:hover { color: var(--ns-accent-3); }

.ns-hidden { display: none; }
.ns-wrap { width: min(var(--ns-wrap), calc(100% - 32px)); margin: 0 auto; }

/* === Header === */
.ns-header { position: sticky; top: 0; z-index: 100; background: rgba(12,15,26,.88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--ns-line); }
.ns-header-top { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.ns-brand { display: inline-flex; align-items: center; gap: 10px; }
.ns-brand-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #0c0f1a; }
.ns-brand-name { font-size: 20px; font-weight: 700; color: var(--ns-text); white-space: nowrap; }
.ns-header-actions { display: flex; align-items: center; gap: 10px; }
.ns-search { display: grid; grid-template-columns: minmax(120px, 200px) auto; }
.ns-search input { height: 38px; border-radius: 10px 0 0 10px; border: 1px solid var(--ns-line); border-right: none; background: var(--ns-surface); padding: 0 14px; color: var(--ns-text); outline: none; font-size: 13px; }
.ns-search input:focus { border-color: var(--ns-accent); }
.ns-search input::placeholder { color: var(--ns-muted); }
.ns-search button { height: 38px; border: 0; border-radius: 0 10px 10px 0; padding: 0 16px; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); color: #0c0f1a; font-weight: 700; font-size: 13px; cursor: pointer; }
.ns-menu-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--ns-line); background: var(--ns-surface); color: var(--ns-text); font-size: 18px; cursor: pointer; align-items: center; justify-content: center; }
.ns-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0 14px; border-top: 1px solid var(--ns-line); margin-top: 2px; }
.ns-nav a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; color: var(--ns-muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: .2s; }
.ns-nav a:hover, .ns-nav-home { color: var(--ns-text); background: var(--ns-surface); }
.ns-nav-home { font-weight: 700; }

/* === Buttons === */
.ns-btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 22px; border-radius: 12px; border: 0; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); color: #0c0f1a; font-weight: 700; font-size: 14px; cursor: pointer; transition: .2s; }
.ns-btn:hover { opacity: .9; color: #0c0f1a; }
.ns-btn-light { background: var(--ns-surface); color: var(--ns-text); border: 1px solid var(--ns-line); }
.ns-btn-light:hover { border-color: var(--ns-accent); color: var(--ns-accent); }

/* === Kicker / Badge === */
.ns-kicker { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(0,212,170,.10); border: 1px solid rgba(0,212,170,.20); color: var(--ns-accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ns-kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ns-accent); box-shadow: 0 0 8px var(--ns-accent); }

/* === Main === */
.ns-main { padding: 28px 0 48px; }

/* === Hero === */
.ns-hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 28px; padding: 40px; background: linear-gradient(135deg, var(--ns-surface) 0%, var(--ns-surface-2) 100%); border: 1px solid var(--ns-line); border-radius: 24px; margin-bottom: 28px; box-shadow: var(--ns-shadow); position: relative; overflow: hidden; }
.ns-hero::before { content: ''; position: absolute; top: -40%; right: -20%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(0,212,170,.08), transparent 60%); pointer-events: none; }
.ns-hero-copy { position: relative; z-index: 1; }
.ns-hero-copy h1 { margin: 16px 0 12px; font-size: 42px; line-height: 1.1; font-weight: 800; word-wrap: break-word; overflow-wrap: break-word; }
.ns-hero-copy p { color: var(--ns-muted); font-size: 16px; margin: 0 0 20px; }
.ns-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ns-hero-side { position: relative; z-index: 1; display: grid; gap: 14px; align-content: start; }
.ns-hero-card { padding: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--ns-line); border-radius: 16px; }
.ns-hero-card .ns-meta { font-size: 12px; color: var(--ns-muted); margin-bottom: 6px; }
.ns-hero-card h3 { font-size: 16px; margin: 4px 0 0; line-height: 1.4; }
.ns-hero-card h3 a { color: var(--ns-text); }
.ns-hero-card h3 a:hover { color: var(--ns-accent); }

/* === Cards Grid === */
.ns-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.ns-card { background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 20px; overflow: hidden; box-shadow: var(--ns-shadow); transition: .3s; }
.ns-card:hover { border-color: var(--ns-line-strong); transform: translateY(-2px); }
.ns-card-thumb { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--ns-surface-2); }
.ns-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ns-card:hover .ns-card-thumb img { transform: scale(1.04); }
.ns-card-body { padding: 16px 18px 18px; }
.ns-card-meta { font-size: 12px; color: var(--ns-muted); margin-bottom: 8px; }
.ns-card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.35; }
.ns-card h3 a { color: var(--ns-text); }
.ns-card h3 a:hover { color: var(--ns-accent); }
.ns-card h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ns-card p { color: var(--ns-muted); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ns-card-badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(0,212,170,.9); color: #0c0f1a; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; z-index: 2; }

/* === Section Head === */
.ns-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.ns-section-head h2 { font-size: 24px; margin: 0; font-weight: 700; }

/* === Stream (article list) === */
.ns-stream { display: grid; gap: 16px; margin-bottom: 28px; }
.ns-stream-item { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 18px; padding: 18px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 18px; transition: .2s; }
.ns-stream-item:hover { border-color: var(--ns-line-strong); }
.ns-stream-thumb { display: block; aspect-ratio: 16/11; border-radius: 12px; overflow: hidden; background: var(--ns-surface-2); }
.ns-stream-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ns-stream-item:hover .ns-stream-thumb img { transform: scale(1.04); }
.ns-stream-body { display: flex; flex-direction: column; justify-content: center; }
.ns-stream-body h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.35; }
.ns-stream-body h3 a { color: var(--ns-text); }
.ns-stream-body h3 a:hover { color: var(--ns-accent); }
.ns-stream-body p { color: var(--ns-muted); font-size: 14px; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ns-stream-body .ns-meta { font-size: 12px; color: var(--ns-muted); }
.ns-stream-body a.ns-read { color: var(--ns-accent); font-weight: 600; font-size: 13px; }

/* === Two-column layout === */
.ns-content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; }
.ns-sidebar { display: grid; gap: 18px; align-content: start; }
.ns-side-panel { padding: 18px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 18px; }
.ns-side-title { font-size: 14px; font-weight: 700; color: var(--ns-accent); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--ns-line); }
.ns-side-link { display: block; padding: 10px 0; border-bottom: 1px solid var(--ns-line); }
.ns-side-link:last-child { border-bottom: none; }
.ns-side-link strong { color: var(--ns-text); font-size: 14px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ns-side-link strong:hover { color: var(--ns-accent); }
.ns-side-link span { display: block; margin-top: 4px; font-size: 12px; color: var(--ns-muted); }
.ns-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-tag-cloud a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: var(--ns-surface-2); border: 1px solid var(--ns-line); color: var(--ns-text); font-size: 13px; }
.ns-tag-cloud a:hover { border-color: var(--ns-accent); color: var(--ns-accent); }
.ns-tag-cloud span { font-size: 11px; color: var(--ns-muted); }

/* === Breadcrumb === */
.ns-breadcrumb, .ns-breadcrumb a, .ns-breadcrumb li { color: var(--ns-muted); font-size: 13px; }
.ns-breadcrumb { margin-bottom: 16px; }

/* === Category / List head === */
.ns-list-head { padding: 28px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 20px; margin-bottom: 24px; }
.ns-list-head h1 { margin: 12px 0 8px; font-size: 34px; font-weight: 800; word-wrap: break-word; overflow-wrap: break-word; }
.ns-list-head p { color: var(--ns-muted); font-size: 15px; margin: 0; }

/* === Pagination === */
.ns-pagination, .pagination { margin-top: 20px; text-align: center; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; margin: 3px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ns-line); background: var(--ns-surface); color: var(--ns-text); font-size: 13px; }
.pagination a:hover { border-color: var(--ns-accent); color: var(--ns-accent); }
.pagination .current, .pagination .active { background: var(--ns-accent); color: #0c0f1a; border-color: var(--ns-accent); font-weight: 700; }

/* === Article Detail === */
.ns-detail { padding: 32px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 24px; margin-bottom: 24px; box-shadow: var(--ns-shadow); }
.ns-detail-header { margin-bottom: 24px; }
.ns-detail-header h1 { margin: 12px 0 10px; font-size: 34px; line-height: 1.2; font-weight: 800; word-wrap: break-word; overflow-wrap: break-word; }
.ns-detail-meta { color: var(--ns-muted); font-size: 13px; margin-bottom: 16px; }
.ns-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ns-tags a { padding: 4px 12px; border-radius: 999px; background: var(--ns-surface-2); border: 1px solid var(--ns-line); color: var(--ns-text); font-size: 13px; }
.ns-tags a:hover { border-color: var(--ns-accent); color: var(--ns-accent); }
.ns-detail-cover { margin-bottom: 24px; border-radius: 18px; overflow: hidden; aspect-ratio: 16/8; }
.ns-detail-cover img { width: 100%; height: 100%; object-fit: cover; }

/* === Article Content (rich text) === */
.ns-article-content { color: var(--ns-text); font-size: 17px; line-height: 1.85; word-wrap: break-word; overflow-wrap: break-word; }
.ns-article-content > :first-child { margin-top: 0 !important; }
.ns-article-content h1, .ns-article-content h2, .ns-article-content h3, .ns-article-content h4 { margin: 1.5em 0 .8em; font-weight: 700; line-height: 1.35; }
.ns-article-content h1 { font-size: 28px; }
.ns-article-content h2 { font-size: 24px; border-bottom: 1px solid var(--ns-line); padding-bottom: 8px; }
.ns-article-content h3 { font-size: 20px; }
.ns-article-content h4 { font-size: 18px; }
.ns-article-content p, .ns-article-content div { margin: 0 0 1em; }
.ns-article-content a { text-decoration: underline; text-underline-offset: 3px; }
.ns-article-content b, .ns-article-content strong { font-weight: 700; color: #f1f5f9; }
.ns-article-content ul, .ns-article-content ol { margin: 14px 0; padding: 0 0 0 28px; line-height: 1.8; }
.ns-article-content ul { list-style: disc; }
.ns-article-content ol { list-style: decimal; }
.ns-article-content li { margin-bottom: 6px; }
.ns-article-content img { max-width: 100%; height: auto; border-radius: 14px; margin: 18px 0; display: block; }
.ns-article-content blockquote { border-left: 4px solid var(--ns-accent); padding: 14px 20px; margin: 20px 0; background: var(--ns-surface-2); border-radius: 0 14px 14px 0; color: var(--ns-muted); }
.ns-article-content blockquote > :first-child { margin-top: 0; }
.ns-article-content blockquote > :last-child { margin-bottom: 0; }
.ns-article-content code { padding: 2px 6px; background: var(--ns-surface-2); border: 1px solid var(--ns-line); border-radius: 6px; font-size: 14px; font-family: 'Consolas', 'Monaco', monospace; color: var(--ns-accent); }
.ns-article-content pre { padding: 18px 20px; margin: 20px 0; background: var(--ns-bg); border: 1px solid var(--ns-line); border-radius: 14px; font-size: 14px; line-height: 1.6; overflow-x: auto; white-space: pre; font-family: 'Consolas', 'Monaco', monospace; color: var(--ns-accent-3); }
.ns-article-content pre code { padding: 0; background: none; border: none; border-radius: 0; color: inherit; }
.ns-article-content hr { border: 0; border-top: 1px solid var(--ns-line); margin: 24px 0; }
.ns-article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; overflow-x: auto; display: block; }
.ns-article-content td, .ns-article-content th { min-width: 60px; border: 1px solid var(--ns-line); padding: 8px 12px; text-align: left; }
.ns-article-content th { font-weight: 700; background: var(--ns-surface-2); }

/* === Detail layout === */
.ns-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; }
.ns-detail-side { display: grid; gap: 18px; align-content: start; }

/* === Tag grid === */
.ns-tag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.ns-tag-card { padding: 18px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 16px; text-align: center; transition: .2s; }
.ns-tag-card:hover { border-color: var(--ns-accent); }
.ns-tag-card h3 { font-size: 16px; margin: 0 0 6px; }
.ns-tag-card h3 a { color: var(--ns-text); }
.ns-tag-card p { color: var(--ns-muted); font-size: 13px; margin: 0; }

/* === Search === */
.ns-search-panel { padding: 32px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 24px; margin-bottom: 24px; }
.ns-search-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,420px); gap: 20px; align-items: end; margin-bottom: 20px; }
.ns-search-wide { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0; }
.ns-search-wide input { height: 44px; border-radius: 12px 0 0 12px; border: 1px solid var(--ns-line); border-right: none; background: var(--ns-surface-2); padding: 0 16px; color: var(--ns-text); outline: none; font-size: 14px; }
.ns-search-wide input::placeholder { color: var(--ns-muted); }
.ns-search-wide button { height: 44px; border: 0; border-radius: 0 12px 12px 0; padding: 0 20px; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); color: #0c0f1a; font-weight: 700; cursor: pointer; }
.ns-search-results { display: grid; gap: 14px; }
.ns-search-card { padding: 18px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 16px; transition: .2s; }
.ns-search-card:hover { border-color: var(--ns-line-strong); }
.ns-search-card h3 { font-size: 18px; margin: 0 0 6px; }
.ns-search-card h3 a { color: var(--ns-text); }
.ns-search-card p { color: var(--ns-muted); font-size: 14px; margin: 0; }
.ns-search-card .ns-meta { font-size: 12px; margin-bottom: 6px; }
.ns-empty { text-align: center; padding: 48px 20px; color: var(--ns-muted); }

/* === SO page === */
.ns-so-page { width: 100%; min-height: 100vh; background: var(--ns-bg); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.ns-so-shell { width: 100%; max-width: 720px; text-align: center; }
.ns-so-brand { display: inline-block; font-size: 22px; font-weight: 700; color: var(--ns-text); margin-bottom: 32px; }
.ns-so-brand:hover { color: var(--ns-accent); }

.ns-so-hero { padding: 40px 32px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 24px; box-shadow: var(--ns-shadow); }
.ns-so-hero h1 { font-size: 32px; margin: 12px 0 8px; font-weight: 800; }
.ns-so-hero p { color: var(--ns-muted); font-size: 15px; margin-bottom: 20px; }

.ns-so-hot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.ns-so-hot a { display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 999px; background: var(--ns-surface-2); border: 1px solid var(--ns-line); color: var(--ns-text); font-size: 13px; transition: .2s; }
.ns-so-hot a:hover { border-color: var(--ns-accent); color: var(--ns-accent); }

.ns-so-form { max-width: 520px; margin: 24px auto; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0; }
.ns-so-form input { height: 48px; border-radius: 14px 0 0 14px; border: 1px solid var(--ns-line); border-right: none; background: var(--ns-surface-2); padding: 0 18px; color: var(--ns-text); outline: none; font-size: 15px; }
.ns-so-form input::placeholder { color: var(--ns-muted); }
.ns-so-form button { height: 48px; border: 0; border-radius: 0 14px 14px 0; padding: 0 24px; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); color: #0c0f1a; font-weight: 700; font-size: 15px; cursor: pointer; }
.ns-so-form-inline { max-width: 100%; margin: 0; grid-template-columns: minmax(180px,260px) auto; }

.ns-so-results-wrap { text-align: left; }
.ns-so-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 20px; margin-bottom: 20px; }
.ns-so-header h1 { font-size: 22px; margin: 0; font-weight: 700; }

.ns-so-results { display: grid; gap: 14px; }
.ns-so-item { padding: 20px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 18px; transition: .2s; }
.ns-so-item:hover { border-color: var(--ns-line-strong); }
.ns-so-item h3 { font-size: 18px; margin: 0 0 6px; }
.ns-so-item h3 a { color: var(--ns-text); }
.ns-so-item h3 a:hover { color: var(--ns-accent); }
.ns-so-item p { color: var(--ns-muted); font-size: 14px; margin: 0; line-height: 1.6; }

/* === DIY === */
.ns-diy-panel { padding: 28px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 20px; }
.ns-diy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.ns-diy-item { padding: 16px; background: var(--ns-surface-2); border: 1px solid var(--ns-line); border-radius: 14px; }
.ns-diy-item strong { color: var(--ns-accent); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 6px; }
.ns-diy-item span { color: var(--ns-text); font-size: 15px; word-break: break-all; }

/* === 404 === */
.ns-empty-page { text-align: center; padding: 80px 24px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 24px; }
.ns-empty-page h1 { font-size: 80px; font-weight: 800; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 8px; }
.ns-empty-page p { color: var(--ns-muted); font-size: 16px; margin-bottom: 24px; }

/* === Footer === */
.ns-footer { padding: 28px 0; margin-top: 20px; }
.ns-footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 20px; align-items: center; padding: 20px 24px; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 18px; }
.ns-footer-brand { font-weight: 700; font-size: 16px; }
.ns-footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.ns-footer-links a { color: var(--ns-muted); font-size: 14px; }
.ns-footer-links a:hover { color: var(--ns-accent); }
.ns-footer-copy { color: var(--ns-muted); font-size: 13px; }
.ns-footer-friend { text-align: center; padding: 14px 0; }
.ns-footer-friend a { color: var(--ns-muted); font-size: 13px; margin: 0 6px; }

/* === Scroll to top === */
.ns-scrolltop { position: fixed; right: 20px; bottom: 24px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2)); color: #0c0f1a; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; box-shadow: 0 4px 16px rgba(0,212,170,.25); z-index: 50; cursor: pointer; font-size: 18px; font-weight: 700; }
.ns-scrolltop.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* === Comments === */
.ns-comments { margin-top: 24px; }

/* === Responsive === */
@media (max-width: 1100px) {
  .ns-hero { grid-template-columns: 1fr; }
  .ns-card-grid { grid-template-columns: repeat(2, 1fr); }
  .ns-tag-grid { grid-template-columns: repeat(3, 1fr); }
  .ns-content-grid, .ns-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
  .ns-menu-toggle { display: inline-flex; }
  .ns-nav { display: none; border-top: none; padding: 8px 0 14px; }
  .ns-nav.open { display: flex; }
  .ns-search-top, .ns-so-form { grid-template-columns: 1fr; }
  .ns-so-header { flex-direction: column; align-items: stretch; }
  .ns-search-wide { grid-template-columns: minmax(0,1fr) auto; }
}

@media (max-width: 768px) {
  .ns-wrap { width: min(100% - 16px, var(--ns-wrap)); }
  .ns-main { padding-top: 18px; }
  .ns-header-top { flex-wrap: wrap; min-height: 50px; gap: 8px; }
  .ns-brand-name { font-size: 18px; }
  .ns-search { grid-template-columns: 1fr auto; }
  .ns-search input { min-width: 0; width: 100%; }
  .ns-hero-copy h1 { font-size: 28px; }
  .ns-list-head h1, .ns-detail-header h1 { font-size: 24px; }
  .ns-card-grid { grid-template-columns: 1fr; }
  .ns-tag-grid { grid-template-columns: repeat(2, 1fr); }
  .ns-stream-item { grid-template-columns: 1fr; }
  .ns-stream-thumb { aspect-ratio: 16/9; }
  .ns-diy-grid { grid-template-columns: 1fr; }
  .ns-footer-inner { grid-template-columns: 1fr; text-align: center; }
  .ns-footer-links { justify-content: center; }
  .ns-hero, .ns-list-head, .ns-search-panel, .ns-detail, .ns-diy-panel, .ns-empty-page { padding: 20px; }
  .ns-article-content { font-size: 15px; }
  .ns-article-content h1 { font-size: 22px; }
  .ns-article-content h2 { font-size: 19px; }
  .ns-article-content h3 { font-size: 17px; }
  .ns-article-content pre { font-size: 12px; padding: 12px; }
  .ns-article-content td, .ns-article-content th { padding: 6px 8px; min-width: 40px; }
  .ns-article-content img { border-radius: 10px; margin: 12px 0; }
}
