.xh-home-notices {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: min(38rem, calc(100% - 2rem));
  max-height: min(38rem, calc(100 * var(--xh-layout-dvh, 1dvh) - 2rem));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--home-line, #cdded8);
  border-radius: .9rem;
  background: var(--home-panel, #fff);
  color: var(--home-text, #19342e);
  box-shadow: 0 20px 62px #19342e30;
  font: 1rem / 1.65 system-ui, "Microsoft YaHei", sans-serif;
}
.xh-home-notices[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
#xh-home-notices {
  --xh-notice-outer-gap: 2rem;
  width: min(48rem, calc(100% - var(--xh-notice-outer-gap)));
  height: min(44rem, calc(100% - var(--xh-notice-outer-gap)));
  height: min(44rem, calc(100 * var(--xh-layout-dvh, 1dvh) - var(--xh-notice-outer-gap)));
  max-height: none;
}
.xh-home-notices::backdrop { background: #19342e75; }
.xh-home-notices-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem .75rem .9rem 1.25rem;
  border-bottom: 1px solid var(--home-line, #cdded8);
  background: var(--home-notice-head, var(--xh-panel, #f6faf8));
}
.xh-home-notices-head h2 { margin: 0; min-width: 0; font-size: 1.2rem; }
.xh-home-notices-head form { flex: none; }
.xh-home-notices-head button { font-family: inherit; cursor: pointer; white-space: nowrap; }
.xh-home-notices-content { overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.25rem; }
.xh-home-notices-status { margin: 0; color: var(--home-muted, #47635c); }
.xh-home-notices-status:empty { display: none; }
.xh-home-notices-content h3 { margin: 0; color: var(--home-accent, #11694f); font-size: .9375rem; }
#xh-home-notices .xh-home-notices-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}
.xh-home-notice-body:not([hidden]) {
  display: grid;
  grid-row: 2;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}
.xh-home-notice-switch { display: none; }
.xh-home-notice-sections {
  display: grid;
  grid-row: 2;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}
.xh-home-notice-sections > section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}
.xh-home-notice-sections h3 { margin-bottom: .5rem; }
.xh-home-notice-scroll {
  min-height: 0;
  padding-inline-end: .25rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.xh-home-notice-scroll:focus-visible,
.xh-home-notice-switch button:focus-visible {
  outline: 2px solid var(--home-accent, #11694f);
  outline-offset: -2px;
  border-radius: .4rem;
}
.xh-home-notice-sections [data-notice-empty] { margin: .65rem 0 0; font-size: .88rem; color: var(--home-muted, #47635c); }
@media (min-width: 700px) {
  .xh-home-notice-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
  .xh-home-notice-sections > section + section {
    padding-inline-start: 1.2rem;
    border-inline-start: 1px solid var(--home-line, #cdded8);
  }
  .xh-home-notice-scroll { scrollbar-gutter: stable; }
}
@media (width < 700px) {
  #xh-home-notices { --xh-notice-outer-gap: 1.25rem; }
  #xh-home-notices .xh-home-notices-content { padding: .85rem 1rem 1rem; }
  .xh-home-notice-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: .85rem;
  }
  .xh-home-notice-switch button {
    min-height: 3.25rem;
    padding: .5rem .35rem;
    border: 1px solid var(--home-line, #cdded8);
    border-radius: .65rem;
    background: var(--home-panel, #fff);
    color: var(--home-text, #19342e);
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
  }
  .xh-home-notice-switch button[aria-pressed="true"] {
    border-color: var(--home-accent, #11694f);
    background: var(--home-soft, #e3f5eb);
    color: var(--home-accent, #11694f);
  }
  .xh-home-notice-sections > section { grid-template-rows: minmax(0, 1fr); }
  .xh-home-notice-sections h3,
  .xh-home-notice-sections[data-active-list="updates"] > [data-notice-list="guides"],
  .xh-home-notice-sections[data-active-list="guides"] > [data-notice-list="updates"] { display: none; }
}
.xh-home-notices-content ul { list-style: none; margin: .35rem 0 0; padding: 0; }
.xh-home-notices-content li {
  padding: .65rem 0;
  border-bottom: 1px solid var(--home-line, #cdded8);
  overflow-wrap: anywhere;
}
.xh-home-notices-content li:last-child { border-bottom: 0; }
.xh-notice-item-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.xh-notice-item-heading > :first-child { flex: 1 1 12rem; min-width: 0; font-weight: 650; }
.xh-notice-pinned {
  padding: 0 .35rem;
  border-radius: .25rem;
  background: var(--home-soft, #e3f5eb);
  color: var(--home-accent, #11694f);
  font-size: .72rem;
}
.xh-home-notices-content .xh-notice-item-link { color: var(--home-accent, #11694f); text-decoration: underline; text-underline-offset: .15em; }
.xh-home-notices-content time { color: var(--home-muted, #47635c); font-size: .8125rem; }
.xh-notice-item-body { margin: .45rem 0 0; white-space: pre-wrap; color: var(--home-muted, #47635c); font-size: .9rem; }
.xh-home-notices.xh-notice-preview { width: min(22.375rem, calc(100% - 2rem)); --home-notice-head: #f6faf8; }
.xh-notice-preview button {
  padding: .45rem .7rem;
  border: 1px solid #cdded8;
  border-radius: .45rem;
  background: #fff;
  color: #11694f;
}
.xh-notice-admin { margin-top: 1rem; }
.xh-notice-admin fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.xh-notice-editor-card { min-width: 0; padding: clamp(.85rem, 2vw, 1.5rem); }
.xh-notice-admin-heading,.xh-notice-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.xh-notice-admin-heading {
  justify-content: space-between;
  margin-bottom: .8rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--admin-page-border, var(--line, #cdded8));
}
.xh-notice-admin-heading h2 { margin: 0; font-size: 1rem; }
.xh-notice-admin-heading small { margin-inline-start: .3rem; font-size: .75rem; font-weight: 500; color: var(--muted, #47635c); }
.xh-notice-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .65rem; }
.xh-notice-card-actions .btn { min-height: 2.4rem; padding: .4rem .65rem; }
.xh-notice-card-status { margin: .25rem 0 .65rem; overflow-wrap: anywhere; }
.xh-notice-card-status:empty { display: none; }
.xh-notice-editor-card .xh-notice-archive-history {
  min-height: 2rem;
  padding: .2rem .4rem;
  margin-bottom: .35rem;
  font-size: .8125rem;
}
.xh-notice-editor-card .xh-notice-archive-history[hidden] { display: none; }
.xh-notice-active-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  padding: .55rem .8rem;
  margin-bottom: .6rem;
  border: 1px solid var(--admin-page-border, #cdded8);
  border-radius: .65rem;
  overflow-wrap: anywhere;
}
.xh-notice-active-summary > div { min-width: 0; }
.xh-notice-active-summary > button { flex-shrink: 0; }
.xh-notice-edit-row { display: grid; gap: .65rem; padding: .8rem; margin-bottom: .6rem; border: 1px solid var(--line, #cdded8); border-radius: .65rem; }
.xh-notice-edit-row label { display: grid; gap: .3rem; min-width: 0; font-size: .85rem; }
.xh-notice-edit-row .input { width: 100%; min-width: 0; }
.xh-notice-edit-row textarea { resize: vertical; }
.xh-notice-edit-meta { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: .5rem; }
.xh-notice-edit-actions label { display: inline-flex; align-items: center; }
.xh-notice-row-options,
.xh-notice-publish-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.xh-notice-row-options { margin-inline-end: auto; }
.xh-notice-publish-actions { margin-inline-start: auto; justify-content: flex-end; }
.xh-notice-row-options [hidden],
.xh-notice-publish-actions[hidden] { display: none; }
.xh-notice-archives {
  margin-bottom: .8rem;
  padding: .55rem .6rem .1rem;
  border: 1px solid var(--admin-page-border, #cdded8);
  border-radius: .65rem;
  background: var(--admin-page-subtle, #f6faf8);
}
.xh-notice-archives > h3 { margin: 0 0 .5rem; font-size: .875rem; }
.xh-notice-archives ul {
  max-block-size: 28rem;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.xh-notice-archives li {
  margin: 0 0 .45rem;
  padding: 0 .7rem;
  border: 1px solid var(--line, #cdded8);
  border-radius: .55rem;
}
.xh-notice-archives li summary, .xh-notice-history li summary {
  padding: .6rem 0;
  font-size: .9rem;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.xh-notice-archives li summary small,
.xh-notice-history li summary small,
.xh-notice-history li summary time {
  margin-inline-start: .55rem;
  color: var(--muted, var(--home-muted, #47635c));
  font-size: .8rem;
}
.xh-notice-record-content { padding: .15rem 0 .65rem; overflow-wrap: anywhere; }
.xh-notice-record-meta { margin: .2rem 0; color: var(--muted, var(--home-muted, #47635c)); font-size: .8rem; }
.xh-notice-record-content .xh-notice-item-body { margin: .35rem 0; }
.xh-notice-record-content .xh-notice-edit-actions { margin-top: .55rem; }
.xh-notice-empty { margin: .75rem 0; color: var(--muted, #47635c); }
.xh-home-notices.xh-notice-history,
.xh-home-notices.xh-notice-entry-edit,
.xh-home-notices.xh-notice-archive-edit {
  --home-line: var(--admin-page-border, #cdded8);
  --home-panel: var(--admin-page-surface, #fff);
  --home-notice-head: var(--admin-page-subtle, #f6faf8);
  --home-text: var(--text, #19342e);
  --home-muted: var(--admin-page-muted, #47635c);
  width: min(41rem, calc(100% - 2rem));
}
.xh-notice-entry-edit fieldset,
.xh-notice-archive-edit fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.xh-notice-entry-edit .xh-home-notices-status:not(:empty),
.xh-notice-archive-edit .xh-home-notices-status:not(:empty) { margin-bottom: .6rem; }
.xh-notice-history .xh-home-notices-content { min-height: 0; padding-top: .45rem; }
.xh-notice-history .xh-home-notices-content li { padding-block: 0; }
.xh-notice-history-restore { margin-top: .5rem; }
@media (max-width: 520px) {
  .xh-notice-edit-meta { grid-template-columns: minmax(0, 1fr); }
  .xh-notice-history li summary time { display: block; margin-inline-start: 1rem; }
}
