/* V67 */
/* ══ PUWEB TV — "What's New" floating window ═══════════════════════════
   A small macOS-style window (traffic lights, sidebar list + detail pane).
   Everything is scoped to .wn-* so it can't leak into the rest of the site.
══════════════════════════════════════════════════════════════════════ */

.wn-win {
  --wn-accent: var(--accent, #9f5dff);
  --wn-text: #f5f5f7;
  --wn-text-2: rgba(245, 245, 247, 0.62);
  --wn-text-3: rgba(245, 245, 247, 0.38);
  --wn-hair: rgba(255, 255, 255, 0.09);

  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9300;
  width: 460px;
  max-width: calc(100vw - 24px);
  border-radius: 12px;
  overflow: hidden;
  color: var(--wn-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  background: rgba(34, 31, 44, 0.74);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.65),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.16),
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transform-origin: 100% 100%;
  pointer-events: none;
  will-change: transform, opacity;
}
.wn-win.wn-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.28s ease, transform 0.46s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.wn-win.wn-closing {
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.wn-win.wn-dragged { transform: none; transition: none; }
.wn-win *, .wn-win *::before, .wn-win *::after { box-sizing: border-box; }
.wn-win button { font: inherit; color: inherit; margin: 0; }

/* ── Title bar ──────────────────────────────────────────────────── */
.wn-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--wn-hair);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.wn-bar:active { cursor: grabbing; }
.wn-lights { display: flex; gap: 8px; z-index: 1; }
.wn-light {
  width: 12px; height: 12px;
  padding: 0;
  border: 0.5px solid rgba(0, 0, 0, 0.28);
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: default;
  background: var(--c);
  color: rgba(0, 0, 0, 0.55);
}
.wn-light.wn-r { --c: #ff5f57; }
.wn-light.wn-y { --c: #febc2e; }
.wn-light.wn-g { --c: rgba(255, 255, 255, 0.2); }
.wn-light svg { width: 8px; height: 8px; opacity: 0; transition: opacity 0.12s; }
.wn-lights:hover .wn-light:not(.wn-g) svg { opacity: 1; }
.wn-light:focus-visible { outline: 2px solid var(--wn-accent); outline-offset: 2px; }
.wn-title {
  position: absolute; left: 0; right: 0;
  text-align: center;
  font-size: 13px; font-weight: 600;
  color: var(--wn-text-2);
  pointer-events: none;
}

/* ── Body: sidebar + detail ─────────────────────────────────────── */
.wn-body { display: flex; height: 250px; }
.wn-win.wn-min .wn-body { display: none; }
.wn-win.wn-min .wn-bar { border-bottom-color: transparent; }

.wn-side {
  width: 188px; flex: none;
  padding: 8px 6px;
  display: flex; flex-direction: column; gap: 1px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--wn-hair);
}
.wn-row {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 6px 7px;
  border: 0; border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: default;
  transition: background 0.15s;
}
.wn-row:hover { background: rgba(255, 255, 255, 0.05); }
.wn-row[aria-selected="true"] {
  background: rgba(159, 93, 255, 0.34);
  box-shadow: inset 0 0 0 0.5px rgba(190, 150, 255, 0.45);
}
.wn-row:focus-visible { outline: 2px solid var(--wn-accent); outline-offset: -2px; }
.wn-txt { min-width: 0; display: flex; flex-direction: column; }
.wn-name {
  font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wn-sub {
  font-size: 10.5px; color: var(--wn-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wn-row[aria-selected="true"] .wn-sub { color: rgba(255, 255, 255, 0.7); }

/* squircle app-style icons */
.wn-ico {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: var(--g);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.3);
  color: #fff;
}
.wn-ico svg { width: 16px; height: 16px; }

.wn-pane {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: 14px 16px 12px;
}
.wn-head { display: flex; align-items: baseline; gap: 8px; }
.wn-h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.wn-date { font-size: 11px; color: var(--wn-text-3); }

.wn-detail { margin-top: 16px; flex: 1; animation: wn-swap 0.28s ease both; }
.wn-detail .wn-ico { width: 44px; height: 44px; border-radius: 11px; }
.wn-detail .wn-ico svg { width: 25px; height: 25px; }
.wn-d-title { margin: 11px 0 4px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.wn-d-text { margin: 0; font-size: 12px; line-height: 1.5; color: var(--wn-text-2); }
@keyframes wn-swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.wn-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wn-count { font-size: 10.5px; color: var(--wn-text-3); }
.wn-btn {
  padding: 4px 14px;
  border: 0; border-radius: 6px;
  font-size: 12px; font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg, #b27bff, #8f4df0);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.35);
  cursor: default;
}
.wn-btn:active { filter: brightness(0.9); }
.wn-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Phones: window floats above the bottom nav, list stacks over detail ── */
@media (max-width: 560px) {
  .wn-win {
    right: 12px; left: 12px;
    width: auto;
    bottom: calc(var(--nav-h, 98px) + 10px + env(safe-area-inset-bottom, 0px));
    transform-origin: 50% 100%;
  }
  .wn-bar { cursor: default; touch-action: auto; }
  .wn-body { flex-direction: column; height: auto; }
  .wn-side {
    width: auto; padding: 6px;
    border-right: 0; border-bottom: 1px solid var(--wn-hair);
  }
  .wn-row { padding: 5px 7px; }
  .wn-pane { padding: 12px 14px 12px; }
  .wn-detail { margin-top: 0; display: flex; flex-wrap: wrap; column-gap: 11px; align-items: flex-start; }
  .wn-detail .wn-ico { width: 36px; height: 36px; border-radius: 9px; }
  .wn-detail .wn-ico svg { width: 20px; height: 20px; }
  .wn-detail .wn-copy { flex: 1; min-width: 0; }
  .wn-d-title { margin-top: 0; }
  .wn-head { order: -1; width: 100%; margin-bottom: 10px; }
  .wn-pane { display: flex; }
  .wn-foot { margin-top: 12px; }
}

/* ── Performance tiers + accessibility ───────────────────────────── */
html.eco-mode .wn-win {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(28, 25, 38, 0.97);
}
html.lite-mode .wn-win { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
@media (prefers-reduced-motion: reduce) {
  .wn-win, .wn-win.wn-open, .wn-win.wn-closing { transition: opacity 0.15s linear; transform: none; }
  .wn-detail { animation: none; }
}
