/* ============================================================
   站内公告栏（站头/工具页顶栏正下方 · 多条轮播）
   说明：独立成文件，因为游戏工具页是自包含布局，不引入 style.css
   ============================================================ */

/* ── 站内公告栏（站头下方通栏 · 多条轮播 · 冻结显示）────────────
   冻结（sticky）：下滑时公告一直贴在站头正下方，站头高 64px。
   工具页顶栏（.tool-bar）不吸顶，所以工具页里把它改成 top:0（见 tools/_css.ejs）。 */
.notice-bar {
  position: sticky;
  top: 64px;
  z-index: 55;
  background: linear-gradient(90deg, var(--red-dim), var(--veil) 26%, var(--veil) 74%, var(--gold-line));
  border-bottom: 1px solid var(--gold-line);
  -webkit-user-select: none; user-select: none;
}
.notice-inner {
  display: flex; align-items: center; gap: 12px;
  height: 40px; max-width: 1280px; margin: 0 auto; padding: 0 18px;
}
.notice-viewport { position: relative; flex: 1 1 auto; min-width: 0; height: 22px; }
.notice-item {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.34s ease, transform 0.34s ease, visibility 0.34s;
}
.notice-item.on { opacity: 1; visibility: visible; transform: none; }
.notice-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.notice-item[data-level="warn"] .notice-dot { background: #e8a33d; }
.notice-item[data-level="hot"] .notice-dot { background: var(--red); }
.notice-text {
  flex: 0 1 auto; min-width: 0; font-size: 13.5px; letter-spacing: 0.3px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-link {
  flex: 0 0 auto; font-size: 13px; color: var(--gold); text-decoration: none;
  white-space: nowrap; border-bottom: 1px solid transparent;
}
.notice-link:hover { border-bottom-color: var(--gold); }
.notice-ctrl { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.notice-arrow {
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 1px solid var(--gold-line); background: transparent; color: var(--gold-soft);
  font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.notice-arrow:hover { background: var(--gold-dim); }
.notice-count { font-size: 12px; color: var(--muted); min-width: 32px; text-align: center; }
.notice-count b { color: var(--gold-soft); font-weight: 400; }
.notice-x {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer;
}
.notice-x:hover { color: var(--gold-soft); }
@media (max-width: 760px) {
  .notice-inner { height: auto; min-height: 38px; padding: 8px 12px; gap: 8px; align-items: flex-start; }
    .notice-viewport { height: auto; min-height: 20px; }
  .notice-item { position: static; display: none; align-items: flex-start; }
  .notice-item.on { display: flex; }
  .notice-dot { margin-top: 7px; }
  .notice-text {
    white-space: normal; overflow: visible;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .notice-arrow { width: 20px; height: 20px; }
}
