/* 多彩首页通知（home_notice）前台样式 — hn- 前缀隔离；配色由 --hn-c 驱动，未设配色回退主题主色 */

.hn-wrap {
  display: grid;
  gap: 8px;
  /* 钩子位紧邻下方内容区（kinetic 的 .kn-grid 无上外边距），补 24px 下间距对齐主题节奏 */
  margin: 0 0 24px;
}

/* 作为主栏区块渲染时：上方与横幅/上一个区块也要留出间距 */
.hn-wrap.is-block {
  margin-top: 24px;
}

.hn-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  /* 注意顺序：border-color 会覆盖四边颜色，必须在它之后单独重设左边色条 */
  border: 1px solid var(--bd);
  border-color: color-mix(in srgb, var(--hn-c, var(--ac)) 30%, var(--bd));
  border-left: 3px solid var(--hn-c, var(--ac));
  border-radius: var(--radius-s);
  background: var(--card);
  /* 支持 color-mix 的浏览器：配色与卡片底色混合，浅色/深色主题都保持可读；上一行是旧浏览器兜底 */
  background: color-mix(in srgb, var(--hn-c, var(--ac)) 10%, var(--card));
  color: var(--tx);
  font-size: 13.5px;
  line-height: 1.65;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hn-item.is-closing {
  opacity: 0;
  transform: translateY(-4px);
}

.hn-ico {
  flex: none;
  display: inline-flex;
  margin-top: 1px;
  color: var(--hn-c, var(--ac));
}

.hn-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hn-text {
  word-break: break-word;
}

.hn-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--hn-c, var(--ac-2));
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.hn-link:hover {
  text-decoration: underline;
}

/* 关闭按钮：靠右不占正文宽度 */
.hn-x {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: -2px -4px 0 0;
  border: 0;
  background: transparent;
  color: var(--tx-3);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hn-x:hover {
  background: var(--soft);
  color: var(--tx);
}

.hn-x:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 1px;
}

@media (max-width: 640px) {
  .hn-wrap {
    margin-bottom: 16px;
  }

  .hn-item {
    padding: 9px 11px;
    font-size: 13px;
  }

  .hn-x {
    width: 26px;
    height: 26px;
  }
}
