/* 公告：参考 noticeUI —— 全屏暗场、左侧邮件正文、右侧竖线 + 附带物品、两侧发光箭头、右上 ✕ */
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 96px;
  align-items: center;
  outline: none;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(40, 60, 90, .35), transparent 70%),
    linear-gradient(180deg, rgba(3, 5, 12, .9), rgba(6, 10, 22, .86));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlay-in .25s ease both;
}
.notice-overlay.is-leaving { animation: overlay-out .2s ease both; }

.notice-close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 26px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  transition: background .2s, filter .2s;
}
.notice-close:hover { background: rgba(255, 244, 220, .08); filter: drop-shadow(0 0 8px rgba(255, 236, 190, .6)); }
.notice-close .sky-icon { stroke-width: 2.2; }

.notice-stage {
  grid-column: 2;
  max-height: 100vh;
  overflow-y: auto;
  padding: 64px 12px 56px;
  overscroll-behavior: contain;
}
.notice-stage.is-right { animation: notice-in-right .3s ease both; }
.notice-stage.is-left { animation: notice-in-left .3s ease both; }
@keyframes notice-in-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes notice-in-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

.notice-sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 1080px; margin: 0 auto; }
.notice-sheet.has-items { grid-template-columns: minmax(0, 1fr) 150px; }
.notice-main { min-width: 0; max-width: 880px; }
.notice-title {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fffaf0;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.3;
  letter-spacing: .04em;
}
.notice-title__icon { flex: none; display: grid; place-items: center; width: 52px; height: 40px; color: #fff4dc; }
.notice-title__icon .sky-icon { width: 52px; height: 40px; stroke-width: 1.8; filter: drop-shadow(0 0 6px rgba(255, 236, 190, .3)); }
.notice-expire { margin: 8px 0 12px; color: rgba(255, 244, 220, .38); font-size: clamp(15px, 1.6vw, 21px); letter-spacing: .04em; }
.notice-text {
  color: #fffaf0;
  font-size: clamp(16px, 1.75vw, 23px);
  line-height: 1.95;
  letter-spacing: .03em;
  word-break: break-word;
}
.notice-hl { color: #f39a4e; font-weight: 600; }
.notice-link { color: #8fd8e8; text-decoration: none; }
.notice-link:hover { color: #c3f1fb; }
.notice-image { margin-top: 22px; overflow: hidden; border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.notice-image img { width: 100%; max-height: 52vh; object-fit: cover; }

.notice-items {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 120px 0 20px 30px;
  border-left: 3px solid rgba(255, 244, 220, .5);
}
.notice-item { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; background: rgba(12, 16, 24, .55); }
.notice-item img { width: 70%; height: 70%; object-fit: contain; filter: drop-shadow(0 0 8px rgba(255, 220, 160, .35)); }
.notice-item__count { position: absolute; top: -8px; right: -10px; color: var(--cream); font-size: 18px; }

.notice-arrow {
  position: relative;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 235, .2), transparent 62%);
  transition: transform .2s var(--ease-spring), filter .2s;
}
.notice-arrow::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  filter: drop-shadow(0 0 8px rgba(255, 244, 220, .8));
}
.notice-arrow--prev::before { border-right: 26px solid rgba(255, 244, 220, .78); margin-right: 6px; }
.notice-arrow--next::before { border-left: 26px solid rgba(255, 244, 220, .78); margin-left: 6px; }
.notice-arrow:hover { transform: scale(1.08); filter: brightness(1.2); }
.notice-arrow--prev { grid-column: 1; grid-row: 1; }
.notice-arrow--next { grid-column: 3; grid-row: 1; }
.notice-stage { grid-row: 1; }
.notice-arrow__dot { position: absolute; top: 10px; right: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--red-dot); box-shadow: 0 0 6px rgba(232, 71, 50, .7); opacity: 0; }
.notice-arrow.has-dot .notice-arrow__dot { opacity: 1; }
.notice-pager {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: rgba(255, 244, 220, .45);
  font-size: 13px;
  letter-spacing: .1em;
}

@media (max-width: 899px) {
  .notice-overlay { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .notice-stage { grid-column: 1; grid-row: 1; padding: 70px 18px 20px; max-height: 100%; height: 100%; }
  .notice-sheet.has-items { grid-template-columns: 1fr; }
  .notice-items { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 18px; padding: 18px 0 0; border-left: 0; border-top: 2px solid rgba(255, 244, 220, .4); }
  .notice-item { width: 64px; height: 64px; border-radius: 18px; }
  .notice-arrow { grid-row: 2; position: absolute; bottom: max(8px, env(safe-area-inset-bottom)); width: 60px; height: 60px; }
  .notice-arrow--prev { left: 18px; }
  .notice-arrow--next { right: 18px; }
  .notice-arrow::before { border-top-width: 15px; border-bottom-width: 15px; }
  .notice-arrow--prev::before { border-right-width: 20px; }
  .notice-arrow--next::before { border-left-width: 20px; }
  .notice-stage { padding-bottom: 86px; }
  .notice-pager { bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)); }
  .notice-close { top: 10px; right: 10px; }
  .notice-title__icon { width: 40px; height: 32px; }
  .notice-title__icon .sky-icon { width: 40px; height: 32px; }
}

/* ---------- 后台公告编辑 ---------- */
.notice-admin__item { align-items: flex-start; }
.notice-admin__title { min-width: 0; overflow: hidden; font-size: 13px; line-height: 1.5; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notice-admin__item .sky-tag { flex: none; }
.notice-form { display: flex; flex-direction: column; gap: 14px; }
.notice-form__field { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; }
.notice-form__label { padding-top: 9px; color: var(--cream-dim); font-size: 13px; letter-spacing: .08em; }
.notice-form__control { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.notice-form__control > .quick-chips { margin-top: 0; align-items: center; }
.notice-form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.notice-form__row .sky-input { flex: 1 1 220px; width: auto; }
.notice-form__body { height: auto; min-height: 200px; padding: 10px 14px; line-height: 1.7; resize: vertical; font-family: var(--font); }
.notice-form__thumb { display: flex; max-width: 360px; }
.notice-form__thumb img { max-height: 120px; border-radius: 8px; object-fit: cover; }
.notice-form__items { display: flex; flex-direction: column; gap: 8px; }
.notice-form__item { display: flex; align-items: center; gap: 8px; }
.notice-form__item .item-search { flex: 0 1 380px; }
.notice-form__count { width: 96px; flex: none; }
.chip .notice-hl, .chip .notice-link { font-size: 12.5px; }
.notice-target { display: flex; flex-direction: column; gap: 8px; }
.notice-target[hidden] { display: none; }
.notice-target__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; }
.notice-target__chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(255, 244, 220, .1); font-size: 13px; }
.notice-target__id { color: var(--cream-faint); font-size: 11.5px; }
.notice-target__x { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--cream-dim); font-size: 11px; cursor: pointer; }
.notice-target__x:hover { background: rgba(255, 244, 220, .14); color: var(--cream); }
.notice-target__search { position: relative; max-width: 420px; }
.notice-target__search .sky-input { width: 100%; }
.notice-target__results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border-radius: 12px;
  background: rgba(16, 22, 28, .97);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 220, .12), 0 14px 40px rgba(0, 0, 0, .5);
}
.notice-target__results[hidden] { display: none; }
.notice-target__opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--cream); text-align: left; cursor: pointer; }
.notice-target__opt:hover:not(:disabled) { background: rgba(255, 244, 220, .08); }
.notice-target__opt:disabled { opacity: .5; cursor: default; }
.notice-target__empty { padding: 8px 10px; }

@media (max-width: 640px) {
  .notice-form__field { grid-template-columns: 1fr; gap: 6px; }
  .notice-form__label { padding-top: 0; }
}

/* ---------- 公告列表：参考 noticeUI/notice_list —— 右侧抽屉、深色卡片、未读红点、已读变灰 ---------- */
.notice-list-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  outline: none;
  background: linear-gradient(90deg, rgba(4, 8, 14, .18) 0%, rgba(4, 8, 14, .45) 60%, rgba(4, 8, 14, .7) 100%);
  animation: overlay-in .22s ease both;
}
.notice-list-overlay.is-leaving { animation: overlay-out .2s ease both; }
.notice-list-overlay.is-leaving .notice-drawer { animation: drawer-out .2s ease both; }
.notice-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  padding: max(54px, calc(env(safe-area-inset-top) + 54px)) 74px 24px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(90deg, transparent, rgba(4, 8, 14, .35) 30%);
  animation: drawer-in .28s var(--ease-spring) both;
}
@keyframes drawer-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes drawer-out { to { opacity: 0; transform: translateX(40px); } }
.notice-list { display: flex; flex-direction: column; gap: 14px; }
.notice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 12px 18px 14px 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(6, 8, 12, .86);
  color: #fffaf0;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: background .2s, transform .2s var(--ease-spring), box-shadow .2s;
}
.notice-card:hover { background: rgba(18, 22, 30, .92); transform: translateX(-4px); box-shadow: 0 0 0 1.5px rgba(255, 244, 220, .28), 0 8px 24px rgba(0, 0, 0, .35); }
.notice-card:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.notice-card__dot { position: absolute; left: 16px; top: 50%; width: 11px; height: 11px; margin-top: -5px; border-radius: 50%; background: var(--red-dot); box-shadow: 0 0 6px rgba(232, 71, 50, .6); }
.notice-card__head { display: flex; align-items: center; gap: 6px; font-size: 19px; letter-spacing: .04em; }
.notice-card__head .sky-icon { stroke-width: 1.9; }
.notice-card__title { width: 100%; overflow: hidden; font-size: 21px; letter-spacing: .03em; white-space: nowrap; text-overflow: ellipsis; }
.notice-card__tags { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; }
.notice-card__pin { padding: 1px 8px; border-radius: 999px; background: rgba(235, 167, 175, .2); color: var(--pink); font-size: 11.5px; }
.notice-card__pin.is-personal { background: rgba(240, 200, 120, .2); color: var(--gold); }
.notice-card.is-read { color: rgba(255, 244, 220, .42); background: rgba(6, 8, 12, .62); }
.notice-card.is-read .notice-card__dot { background: rgba(255, 244, 220, .45); box-shadow: none; }
.notice-list__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 0; color: var(--cream-faint); }

@media (max-width: 640px) {
  .notice-list-overlay { background: rgba(4, 8, 14, .6); }
  .notice-drawer { width: 100vw; padding: 66px 14px 20px; background: none; }
  .notice-card { padding: 10px 14px 12px 36px; }
  .notice-card__dot { left: 13px; }
  .notice-card__head { font-size: 16px; }
  .notice-card__title { font-size: 17.5px; }
}
