html, body { background: #0e141b; min-height: 100vh; }
[hidden] { display: none !important; }
.nw-wrap { position: relative; z-index: 1; padding: 1.5rem 1.75rem 4rem 2.25rem; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 2rem; align-items: stretch; }
.nw-wrap--edit { padding-left: 1.75rem; grid-template-columns: minmax(0, 1fr); max-width: 1320px; margin: 0 auto; }
.nw-main { min-width: 0; }

.nw-btn {
  font-family: 'Lato', Arial, sans-serif; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  padding: 0.5rem 1.15rem; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
  color: #f0c060; background: rgba(20,16,30,0.75); border: 1px solid rgba(240,192,96,0.6);
   transition: background 0.15s, box-shadow 0.15s;
}
.nw-btn:hover { background: rgba(240,192,96,0.14); box-shadow: 0 0 0 1px rgba(240,192,96,0.55); }
.nw-btn:disabled { opacity: 0.5; cursor: default; }
.nw-btn--blue { color: #cfe0f5; border-color: rgba(127,168,217,0.7);  }
.nw-btn--blue:hover { background: rgba(127,168,217,0.16); box-shadow: 0 0 0 1px rgba(127,168,217,0.55); }
.nw-btn--danger { color: #ff9a9a; border-color: rgba(255,120,120,0.6); box-shadow: none; }
.nw-btn--danger:hover { background: rgba(255,120,120,0.14); box-shadow: none; }
.nw-btn--sm { font-size: 0.8rem; padding: 0.3rem 0.75rem; }

.nw-side { border-right: 1px solid rgba(255,255,255,0.1); padding-right: 1.4rem; }
.nw-side-in { position: sticky; top: 1.25rem; }
.nw-art-link { display: block; width: fit-content; margin: 0 auto 1.1rem; }
.nw-side-art { display: block; width: 170px; max-width: 100%; }
.nw-side h2 { cursor: pointer; font-family: 'Lato', Arial, sans-serif; font-size: 1.25rem; color: #fff; margin: 0 0 0.8rem 0.4rem;  display: flex; align-items: center; gap: 0.45rem; }
.nw-side h2 img { width: 20px; height: 20px; object-fit: contain; }
.nw-new-btn { width: 100%; justify-content: center; }
.nw-side-hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 0.9rem 0; }
.nw-list { display: flex; flex-direction: column; max-height: calc(100vh - 24rem); min-height: 6rem; overflow-y: auto; }
.nw-item { display: block; flex-shrink: 0; padding: 0.7rem; cursor: pointer; border-left: 3px solid transparent; color: #b6c2d3; }
.nw-item + .nw-item { border-top: 1px solid rgba(255,255,255,0.15); }
.nw-item:hover { background: rgba(127,168,217,0.1); color: #fff; }
.nw-item.active { background: rgba(127,168,217,0.16); border-left-color: #7fa8d9; color: #fff; }
.nw-item-title { font-family: 'Lato', Arial, sans-serif; font-weight: 500; font-size: 0.97rem; line-height: 1.25; }
.nw-item-date { font-size: 0.75rem; color: #7d8ba0; margin-top: 0.12rem; }
.nw-draft { font-family: 'Lato', Arial, sans-serif; font-size: 0.68rem; font-weight: 600; color: #ff9a9a; border: 1px solid rgba(255,154,154,0.55); border-radius: 999px; padding: 0 0.45rem; margin-left: 0.35rem; vertical-align: middle; }
.nw-empty { text-align: center; color: #7d8ba0; padding: 2rem 0.5rem; font-size: 0.92rem; }

.nw-banner { position: relative; width: 100%; aspect-ratio: 3.2 / 1; border-radius: 10px; overflow: hidden; background: #0a0f15; box-shadow: 0 10px 40px rgba(0,0,0,0.45); margin-bottom: 2rem; }
.nw-banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; display: block; pointer-events: none; }
.nw-banner-slide.active { opacity: 1; pointer-events: auto; }
.nw-banner-bg { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: center; }
.nw-banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: rgba(10,14,20,0.6); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.nw-banner-arrow:hover { background: rgba(127,168,217,0.3); }
.nw-banner-arrow--prev { left: 0.7rem; } .nw-banner-arrow--next { right: 0.7rem; }
.nw-banner-dots { position: absolute; bottom: 0.7rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.4rem; z-index: 3; }
.nw-banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; }
.nw-banner-dot.active { background: #7fa8d9; }

.nw-home-title { font-family: 'Lato', Arial, sans-serif; font-size: 1.9rem; color: #fff; margin: 0 0 1.2rem; }
.nw-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 42%)); justify-content: center; gap: 1.75rem 7%; }
.nw-more { display: flex; justify-content: center; margin-top: 1.75rem; }
.nw-ncard { cursor: pointer; background: #1c1e2b; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.nw-ncard:hover { transform: translateY(-1px); border-color: rgba(127,168,217,0.6); box-shadow: 0 10px 28px rgba(0,0,0,0.5); }
.nw-ncard-body { padding: 1.3rem 1.5rem 1.1rem; flex: 1; }
.nw-ncard-title { font-family: 'Lato', Arial, sans-serif; font-size: 1.5rem; font-weight: 600; color: #6ea8ec; margin: 0 0 0.3rem; }
.nw-ncard-date { font-size: 0.78rem; color: #7d8ba0; margin-bottom: 0.55rem; }
.nw-ncard-sum { color: #c9ced9; font-size: 1rem; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-ncard-img { width: calc(100% - 3rem); margin: 0 1.5rem 1.5rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; background: #12141d; }
.nw-cover-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 0.7rem 0.9rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.nw-cover-bar .nw-thumb { margin: 0; max-width: 160px; max-height: 90px; object-fit: cover; }
.nw-req { color: #ff9a9a; }

.nw-article { min-width: 0; }
.nw-article-date { font-size: 1.05rem; font-weight: 400; color: #9aa4b8; margin-bottom: 1.6rem; }
.nw-article-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-bottom: 0.5rem; }
.nw-article h1 { flex: 1 1 18rem; min-width: 0; font-family: 'Lato', Arial, sans-serif; font-size: 2.8rem; line-height: 1.25; color: #cfe0f5; margin: 0; }
.nw-article-actions { display: flex; gap: 0.8rem; margin-left: auto; }
.nw-article-actions .nw-btn { font-size: 1.2rem; padding: 0.75rem 1.9rem; }
.nw-blk { margin: 0 0 1.6rem; }
.nw-blk-title { font-family: 'Lato', Arial, sans-serif; font-size: 1.9rem; color: #f0c060; margin: 0 0 0.5rem; padding-bottom: 0.3rem; border-bottom: 1px solid rgba(240,192,96,0.25); }
.nw-prose { color: #e6e8f2; line-height: 1.75; font-size: 1.3rem; font-weight: 400; }
.nw-prose h2 { font-family: 'Lato', Arial, sans-serif; color: #f0c060; font-size: 1.75rem; margin: 1.5rem 0 0.5rem; }
.nw-prose h3 { font-family: 'Lato', Arial, sans-serif; color: #cfe0f5; font-size: 1.45rem; margin: 1.3rem 0 0.4rem; }
.nw-prose p { margin: 0.6rem 0; }
.nw-prose > :first-child { margin-top: 0; }
.nw-prose a, .nw-blk a { color: #7fa8d9; }
.nw-prose hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 1.2rem 0; }
.nw-prose ul { list-style: none; padding: 0; margin: 0.5rem 0; }
.nw-prose li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.2rem 0; }
.nw-prose li .nw-bullet { flex: 0 0 auto; font-family: 'Lato', Arial, sans-serif; font-weight: 600; font-size: 0.85rem; padding: 0.05rem 0.6rem; border-radius: 999px; border: 1px solid; min-width: 3.6em; text-align: center; }
.nw-bullet--add { color: #8fe0a8; border-color: rgba(143,224,168,0.55); background: rgba(143,224,168,0.1); }
.nw-bullet--chg { color: #8fbfff; border-color: rgba(143,191,255,0.55); background: rgba(143,191,255,0.1); }
.nw-bullet--fix { color: #ffc77a; border-color: rgba(255,199,122,0.55); background: rgba(255,199,122,0.1); }
.nw-bullet--dot { color: #9aa4b8; border: none !important; min-width: 0 !important; padding: 0 !important; }
.nw-img { display: block; max-width: 100%; border-radius: 8px; margin: 0 auto; }
.nw-img--medium { max-width: 70%; }
.nw-img--small { max-width: 40%; }
.nw-caption { text-align: center; color: #9aa4b8; font-size: 1.05rem; font-weight: 400; margin-top: 0.4rem; }
.nw-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.nw-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.nw-side-blk { display: flex; gap: 1.4rem; align-items: flex-start; }
.nw-side-blk--right { flex-direction: row-reverse; }
.nw-side-blk > img { flex: 0 0 38%; max-width: 38%; border-radius: 8px; }
.nw-side-blk > div { flex: 1; min-width: 0; }
.nw-linkbtn { display: inline-block; font-family: 'Lato', Arial, sans-serif; font-weight: 600; padding: 0.55rem 1.4rem; border-radius: 999px; color: #0e141b !important; background: #7fa8d9; text-decoration: none; }
.nw-linkbtn:hover { background: #9bbfe8; }
.nw-divider { border: none; border-top: 1px solid rgba(255,255,255,0.15); }

.nw-bar { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.nw-bar-title { flex: 1 1 280px; font-family: 'Lato', Arial, sans-serif; font-size: 1.5rem; font-weight: 600; color: #cfe0f5; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 0.5rem 0.9rem; }
.nw-bar-title:focus, .nw-in:focus { outline: none; border-color: rgba(127,168,217,0.9);  }
.nw-builder { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.nw-palette { position: sticky; top: 1.25rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.nw-palette h3 { font-family: 'Lato', Arial, sans-serif; color: #cfe0f5; font-size: 1.05rem; margin: 0 0 0.2rem; }
.nw-palette .nw-btn { justify-content: flex-start; }
.nw-canvas { display: flex; flex-direction: column; gap: 0.8rem; min-height: 200px; }
.nw-canvas-empty { border: 2px dashed rgba(255,255,255,0.14); border-radius: 12px; padding: 3rem 1rem; text-align: center; color: #7d8ba0; }
.nw-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; }
.nw-card.dragging { opacity: 0.4; }
.nw-card.drop-before { box-shadow: 0 -3px 0 #7fa8d9; }
.nw-card.drop-after { box-shadow: 0 3px 0 #7fa8d9; }
.nw-card-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.7rem; background: rgba(127,168,217,0.1); border-bottom: 1px solid rgba(255,255,255,0.08); }
.nw-grip { cursor: grab; color: #7fa8d9; font-size: 1.2rem; line-height: 1; user-select: none; padding: 0 0.2rem; }
.nw-card-type { font-family: 'Lato', Arial, sans-serif; font-weight: 600; color: #cfe0f5; flex: 1; }
.nw-ic { background: none; border: 1px solid rgba(255,255,255,0.15); color: #cfe0f5; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 0.85rem; }
.nw-ic:hover { background: rgba(127,168,217,0.2); }
.nw-ic--del:hover { background: rgba(255,120,120,0.2); color: #ff9a9a; }
.nw-card-body { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.nw-lbl { font-family: 'Lato', Arial, sans-serif; font-size: 0.85rem; color: #9fb0c8; margin-bottom: 0.15rem; display: block; }
.nw-in { width: 100%; box-sizing: border-box; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; color: #f0f0f0; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.95rem; }
textarea.nw-in { min-height: 140px; resize: vertical; line-height: 1.55; }
.nw-hint { font-size: 0.78rem; color: #7d8ba0; }
.nw-row { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: flex-end; }
.nw-row > div { flex: 1 1 160px; }
.nw-thumb { max-width: 220px; max-height: 140px; border-radius: 8px; display: block; margin-bottom: 0.4rem; }
.nw-error { color: #ff9a9a; }
.nw-note { font-size: 0.85rem; color: #7d8ba0; margin-top: 0.4rem; }

@media (max-width: 860px) {
  .nw-wrap { grid-template-columns: 1fr; padding: 1rem 1rem 3rem; }
  .nw-side { border-right: none; padding-right: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
  .nw-side-in { position: static; }
  .nw-side-art { width: 110px; }
  .nw-banner { aspect-ratio: 2 / 1; }
  .nw-cards { grid-template-columns: 1fr; justify-content: stretch; column-gap: 0; }
  .nw-list { max-height: 260px; }
  .nw-builder { grid-template-columns: 1fr; }
  .nw-palette { position: static; flex-direction: row; flex-wrap: wrap; }
  .nw-palette h3 { width: 100%; }
  .nw-article h1 { font-size: 2rem; }
  .nw-blk-title { font-size: 1.5rem; }
  .nw-prose { font-size: 1.15rem; line-height: 1.7; }
  .nw-prose h2 { font-size: 1.4rem; }
  .nw-prose h3 { font-size: 1.22rem; }
  .nw-prose li .nw-bullet { font-size: 0.75rem; }
  .nw-caption, .nw-article-date { font-size: 0.95rem; }
  .nw-side-blk, .nw-side-blk--right { flex-direction: column; }
  .nw-side-blk > img { flex-basis: auto; max-width: 100%; }
}

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  .nw-wrap { padding-bottom: 1rem; }
}

.nw-menu-btn, .nw-menu-backdrop { display: none; }

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  html:has(.nw-menu-open) { overflow: hidden; }
  body:has(.nw-menu-open) .fpnav-bottombar { visibility: hidden; }
  .nw-wrap { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.5rem; padding-top: 0.5rem; padding-left: 1rem; }
  .nw-wrap.nw-menu-open { z-index: 400; }
  .nw-menu-btn { display: flex; align-items: center; justify-content: center; justify-self: start; width: 40px; height: 40px; margin-left: -0.3rem; padding: 0; border: none; background: none; color: #ccc; cursor: pointer; }
  .nw-menu-btn svg { width: 24px; height: 24px; }
  .nw-wrap--edit .nw-menu-btn { display: none; }
  .nw-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 300; width: 78vw; max-width: 300px; padding: 1.5rem 1.25rem 1.1rem; border: none; background: #000; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; transform: translateX(-100%); visibility: hidden; transition: transform 0.28s ease, visibility 0.28s; }
  .nw-side-in { position: static; }
  .nw-list { max-height: none; overflow: visible; }
  .nw-wrap.nw-menu-open .nw-side { transform: translateX(0); visibility: visible; }
  .nw-wrap.nw-menu-open .nw-menu-backdrop { display: block; position: fixed; inset: 0; z-index: 290; background: rgba(0,0,0,0.5); touch-action: none; }
}
