/* 지도 위 「홀덤 NEWS」 창(`assets/js/news-panel.js`).
 *
 * **파마 부동산 NEWS 창의 값을 그대로 옮겼다**(video_news_screen.dart `_NewsInk`·`_NewsType`, root_screen.dart
 * `panelW = 420`). 먹색 판 위에서 칸을 선이 아니라 **흰색 투명도**로만 가른다.
 *
 * `app.css` 에 안 넣는다 — 세션 여럿이 그 파일을 동시에 고쳐 조각이 되감긴 적이 있다(my.css 와 같은 판단).
 */

.newsp {
  --np-bg: #1e1e22;
  --np-ink: #f5f5f7;
  --np-muted: #8e8e93;
  --np-hair: #32323a;
  --np-sel: rgba(255, 255, 255, 0.08);
  --np-chip: rgba(255, 255, 255, 0.08);
  --np-chip-ink: #d7d7dc;
  --np-chip-on: #e8e8ed;

  position: absolute;
  left: 0; right: 0;
  /* 롤링바 밑에서 시작한다 — 매장 카드(`.panel`)와 같은 자리. */
  top: var(--roll); bottom: 0;
  /* 폰에서 화면을 다 쓰므로 오른쪽 레일(z 10)도 덮는다. 롤링바(z 19)·상단바(z 20)는 못 덮는다. */
  z-index: 11;
  display: flex;
  flex-direction: column;
  background: var(--np-bg);
  color: var(--np-ink);
  transform: translateX(0);
  transition: transform 0.2s ease;
}
.newsp[hidden] { display: flex !important; transform: translateX(-105%); visibility: hidden; pointer-events: none; transition: transform 0.2s ease, visibility 0s 0.2s; }
@media (min-width: 900px) {
  .newsp { right: auto; width: 420px; border-right: 1px solid var(--np-hair); box-shadow: 8px 0 28px rgba(0, 0, 0, 0.18); }
}
@media (prefers-reduced-motion: reduce) { .newsp, .newsp[hidden] { transition: none; } }

/* ── 머리 ── 아이콘 · 제목 · 인라인 부제 · 안내 한 줄 · ✕ */
.np-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 16px 8px 12px 16px; }
.np-head > svg { flex: none; width: 22px; height: 22px; stroke: var(--np-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.np-htxt { flex: 1; min-width: 0; }
.np-tline { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.np-tline h2 { margin: 0; flex: none; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.2px; color: var(--np-ink); }
.np-tline h2 b { color: var(--y); font-weight: 800; }
.np-meta, .np-tline span {
  font-size: 11.5px; line-height: 1.3; font-weight: 500; letter-spacing: 0.3px; color: var(--np-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.np-meta { display: block; margin-top: 2px; }

.np-x {
  flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: none; color: var(--np-muted); cursor: pointer;
}
.np-x svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.np-x:hover { background: var(--np-sel); color: var(--np-ink); }
.np-x:focus-visible { outline: 2px solid var(--y); outline-offset: 0; }

/* ── 재생기 ── 고른 영상이 창 위쪽에 16:9 로 붙는다.
   ⚠ 여기서 iframe 에 자리를 주지 않는다 — 크롭을 이겨 유튜브 제목·로고를 도로 불러온다(app.css `.ytnow-frame`). */
.np-stage { flex: none; }
.np-stage[hidden] { display: none; }
.np-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.np-now { display: flex; align-items: flex-start; gap: 4px; padding: 12px 8px 12px 16px; }
.np-now .np-x { width: 32px; height: 32px; }
.np-now .np-x svg { width: 18px; height: 18px; }
.np-nowtxt { flex: 1; min-width: 0; }
.np-nowtxt b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--np-ink);
}
.np-nowtxt span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.3; font-weight: 500; letter-spacing: 0.3px; color: var(--np-muted); }

/* ── 칩 줄 ── 넘치면 옆으로 민다. */
.np-chips {
  flex: none; height: 40px; display: flex; align-items: center; gap: 6px;
  padding: 0 12px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.np-chips::-webkit-scrollbar { display: none; }
.np-chip {
  flex: none; padding: 6px 12px; border: 0; border-radius: 999px;
  background: var(--np-chip); color: var(--np-chip-ink);
  font: inherit; font-size: 11.5px; line-height: 1.3; font-weight: 500; letter-spacing: 0.3px;
  white-space: nowrap; cursor: pointer;
}
.np-chip[aria-pressed="true"] { background: var(--np-chip-on); color: #1e1e22; font-weight: 700; }
.np-chip:focus-visible { outline: 2px solid var(--y); outline-offset: 1px; }

/* ── 목록 ── 카드가 아니라 행. 테두리·구분선 없이 먹색 위에 얹힌다. */
.np-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px 24px; }
.np-row {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 12px 8px; border: 0; border-radius: 12px; background: transparent;
  font: inherit; text-align: left; color: var(--np-ink); cursor: pointer;
}
.np-row:hover { background: rgba(255, 255, 255, 0.04); }
.np-row.on { background: var(--np-sel); }
.np-row:focus-visible { outline: 2px solid var(--y); outline-offset: -2px; }
.np-thumb { position: relative; flex: none; width: 124px; height: 70px; border-radius: 10px; overflow: hidden; background: #2c2c32; }
.np-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-play {
  position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center;
}
.np-play svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }
.np-row.on .np-play svg { display: none; }
/* 재생 중 표식 — 파마의 `Icons.equalizer` 자리. 막대 셋. */
.np-row.on .np-play::before {
  content: ''; width: 14px; height: 12px;
  background: linear-gradient(#fff, #fff) 0 100% / 3px 60% no-repeat, linear-gradient(#fff, #fff) 50% 100% / 3px 100% no-repeat, linear-gradient(#fff, #fff) 100% 100% / 3px 40% no-repeat;
}
.np-txt { flex: 1; min-width: 0; }
.np-txt b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--np-ink); overflow-wrap: anywhere;
}
.np-txt span { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.3; font-weight: 500; letter-spacing: 0.3px; color: var(--np-muted); }

.np-more { display: grid; place-items: center; padding: 24px; }
.np-more i {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(142, 142, 147, 0.35); border-top-color: var(--np-muted);
  animation: np-spin 0.8s linear infinite;
}
@keyframes np-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .np-more i { animation: none; } }

.np-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 24px; text-align: center; }
.np-empty b { font-size: 16px; font-weight: 600; color: var(--np-ink); }
.np-empty span { font-size: 11.5px; line-height: 1.6; color: var(--np-muted); }
.np-retry {
  margin-top: 12px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--np-chip-on); color: #1e1e22; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* 상단바 단추 — 창이 열려 있으면 눌린 모양(금색 테). */
.topbar .news-link[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--y); }
