/* 通知三档 + 顶栏铃铛（shared/notice.js，2026-10-24）。颜色只用 tokens.css 的变量。 */
/* 只管自己的元素（外壳别的地方不跟着变）：display:flex / grid 会盖掉 hidden */
.nt-bar[hidden], .nt-mask[hidden], .nt-drop[hidden], .nt-count[hidden], .nt-body[hidden], .nt-points[hidden], .nt-more[hidden] { display: none !important; }

/* ---------- 档位小牌 ---------- */
.nt-tag { flex: 0 0 auto; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 12px;
  font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent; }
.nt-tag.must { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-border); }
.nt-tag.imp { background: var(--warning-bg); color: var(--warning-fg); border-color: var(--warning-border); }
.nt-tag.new { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-border); }

/* ---------- 顶栏铃铛 ---------- */
.nt-bell-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.nt-bell { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); cursor: pointer; }
.nt-bell:hover { border-color: var(--border-strong); color: var(--text-primary); }
.nt-bell .nt-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1;
  background: var(--warning-fg); color: var(--text-on-accent); border: 2px solid var(--canvas); }
.nt-bell.has-must .nt-count { background: var(--danger-solid); }
.nt-drop { position: absolute; top: calc(100% + 8px); right: 0; z-index: var(--z-popover); width: 340px; max-height: min(70vh, 520px); overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-2); padding: 6px; }
.nt-drop, .nt-drop * { letter-spacing: normal; text-transform: none; }   /* 顶栏里的 p 有大字距（页眉小标题用的），别带进来 */
.nt-drop-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; }
.nt-drop-head b { font-size: 14px; color: var(--text-primary); }
.nt-drop-head a { font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.nt-drop-note { margin: 4px 8px 6px; font-size: 12px; color: var(--text-secondary); }
.nt-item { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 8px; border: 0; border-radius: var(--radius-md); background: none;
  text-align: left; cursor: pointer; color: var(--text-secondary); font: inherit; }
.nt-item:hover { background: var(--surface-hover); }
.nt-item-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nt-item-t b { font-weight: 500; font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-item.todo .nt-item-t b { font-weight: 700; color: var(--text-primary); }
.nt-item small { font-size: 12px; color: var(--text-muted); padding-left: 2px; }
.nt-empty { margin: 10px 8px 12px; font-size: 13px; color: var(--text-muted); }
.nt-drop-rule { margin: 6px 8px 4px; padding-top: 8px; border-top: 1px solid var(--border-subtle); font-size: 12px; color: var(--text-muted); cursor: help; }

/* ---------- 重要：顶栏下面的横条 ---------- */
.nt-bar { display: flex; align-items: center; gap: 10px; min-width: 0; margin: -6px 0 12px; padding: 7px 8px 7px 12px; border-radius: 12px;
  border: 1px solid var(--warning-border); background: var(--warning-bg); font-size: 13px; color: var(--text-primary); }
.nt-bar.is-new { border-color: var(--success-border); background: var(--success-bg); }
.nt-bar-t { flex: 0 1 auto; min-width: 0; font-weight: 700; color: var(--text-primary); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-bar-t:hover { text-decoration: underline; }
.nt-bar-p { flex: 1 1 0; min-width: 0; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-bar-more { flex: 0 0 auto; border: 0; background: none; padding: 2px 4px; color: var(--text-secondary); font: inherit; font-size: 12px;
  cursor: pointer; white-space: nowrap; text-decoration: underline; }
.nt-bar-ok { flex: 0 0 auto; margin-left: auto; height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.nt-bar-ok:hover { border-color: var(--text-secondary); }
.nt-bar-ok:disabled { opacity: .6; cursor: default; }

/* ---------- 必读：登录先弹 ---------- */
.nt-mask { position: fixed; inset: 0; z-index: 1280; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--overlay); }
.nt-box { display: flex; flex-direction: column; width: min(620px, 100%); max-height: min(86vh, 760px); box-sizing: border-box; padding: 20px 22px 16px;
  border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-3); border-top: 4px solid var(--danger-solid); }
.nt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.nt-step { font-weight: 600; color: var(--text-secondary); }
.nt-meta { margin-left: auto; }
.nt-box h2 { margin: 10px 0 8px; font-size: 20px; line-height: 1.35; color: var(--text-primary); }
.nt-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.nt-points { margin: 0 0 8px; padding: 10px 14px 10px 30px; border-radius: var(--radius-md); background: var(--fluo-bg); }
.nt-points li { margin: 3px 0; font-size: 15px; line-height: 1.55; color: var(--text-primary); font-weight: 500; }
.nt-body { font-size: 14px; line-height: 1.65; color: var(--text-primary); padding: 4px 2px 8px; overflow-wrap: anywhere; }
.nt-body img { max-width: 100%; max-height: 360px; height: auto; border-radius: var(--radius-sm); }
.nt-body p { margin: 6px 0; }
.nt-more { display: block; margin: 2px 0 8px; padding: 2px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.nt-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.nt-ok { height: 36px; padding: 0 18px; border-radius: var(--radius-md); border: 0; background: var(--accent); color: var(--text-on-accent);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.nt-ok:hover { background: var(--accent-hover); }
.nt-ok:disabled { opacity: .6; cursor: default; }
.nt-later { height: 36px; padding: 0 14px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-primary); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.nt-later:hover { background: var(--surface-hover); }
.nt-open { margin-left: auto; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.nt-note { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); }

/* ---------- 手机（≤640，外壳手机版 html.is-phone） ---------- */
@media (max-width: 640px) {
  .nt-mask { padding: 0; align-items: stretch; }
  .nt-box { width: 100%; max-height: none; height: 100%; border-radius: 0; padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); }
  .nt-meta { margin-left: 0; flex-basis: 100%; }
  .nt-box h2 { font-size: 18px; }
  .nt-foot { gap: 8px; }
  .nt-ok, .nt-later { flex: 1 1 auto; }
  .nt-open { margin-left: 0; flex-basis: 100%; text-align: center; }
  .nt-drop { position: fixed; top: 54px; left: 8px; right: 8px; width: auto; }
  .nt-bar { margin: 0 8px 8px; padding: 6px 6px 6px 10px; gap: 8px; }
  .nt-bar-p, .nt-bar-more { display: none; }
  .nt-bell { width: 32px; height: 32px; }
}
html.is-phone .nt-bar { flex: 0 0 auto; }
