@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&family=Righteous&family=ZCOOL+XiaoWei&display=swap');

:root {
  --sakura:    #f8a5c2;
  --sakura-dk: #e885a5;
  --lavender:  #c4a0e8;
  --lavender-dk:#a070d0;
  --sky:       #7fc8f8;
  --peach:     #fbc4ab;
  --peach-dk:  #f5a88a;
  --mint:      #8dd4b8;
  --ink:       #2a2035;
  --paper:     #faf5f0;
  --color-sakura: var(--sakura);
  --color-sakura-dk: var(--sakura-dk);
  --color-lavender: var(--lavender);
  --color-lavender-dk: var(--lavender-dk);
  --color-sky: var(--sky);
  --color-peach: var(--peach);
  --color-peach-dk: var(--peach-dk);
  --color-mint: var(--mint);
}

*{margin:0;padding:0;box-sizing:border-box;}

html{font-size:16px;scroll-behavior:smooth;-webkit-font-smoothing:antialiased;}
body{
  font-family:'Inter',"Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans SC","Segoe UI",sans-serif;
  color:var(--ink);
}

@font-face {
  font-family: 'Yozai';
  src: url('/fonts/Yozai-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Yozai';
  src: url('/fonts/Yozai-Regular.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

::selection{background:#f8a5c2;color:#2a2035;}

/* ── Background ── */
.bg-anime{
  background-color:#120f1c;
  background-image:
    url('https://pic1.rpgsky.net/imgcn/moepic/2025/04/09/9ce126176f1396dc5bb2bcaec0327aeb.webp'),
    linear-gradient(145deg, rgba(20,16,32,0.96) 0%, rgba(40,28,58,0.88) 38%, rgba(89,70,121,0.68) 100%);
  background-size:cover;
  background-position:center 30%;
  background-attachment:fixed;
  background-repeat:no-repeat;
}
.bg-anime-overlay{
  background:linear-gradient(180deg,
    rgba(30,20,40,0.50) 0%,
    rgba(30,20,40,0.30) 30%,
    rgba(250,245,240,0.55) 60%,
    rgba(250,245,240,0.70) 100%
  );
}

/* ── Card anime ── */
.card-anime{
  background:rgba(255,255,255,0.75);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(248,165,194,0.12);
  border-radius:1rem;
  box-shadow:0 4px 24px rgba(150,120,160,0.08);
  transition:all 0.25s;
}
.card-anime:hover{
  background:rgba(255,255,255,0.90);
  border-color:rgba(248,165,194,0.25);
  box-shadow:0 8px 32px rgba(150,120,160,0.12);
  transform:translateY(-2px);
}

/* ── Gradient text ── */
.text-gradient-sakura{
  background:linear-gradient(135deg, #e885a5, #a070d0, #7fc8f8);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* ── Custom buttons ── */
.btn-sakura, .btn-lavender, .btn-sky{color:#fff!important;border:none!important;}
.btn-sakura{
  background:linear-gradient(135deg,var(--sakura),var(--sakura-dk))!important;
  box-shadow:0 4px 16px rgba(248,165,194,0.25)!important;
}
.btn-sakura:hover{box-shadow:0 6px 24px rgba(248,165,194,0.35)!important;transform:translateY(-1px);}
.btn-lavender{
  background:linear-gradient(135deg,var(--lavender),var(--lavender-dk))!important;
  box-shadow:0 4px 16px rgba(196,160,232,0.25)!important;
}
.btn-lavender:hover{box-shadow:0 6px 24px rgba(196,160,232,0.35)!important;transform:translateY(-1px);}
.btn-sky{
  background:linear-gradient(135deg,var(--sky),#5ab0e8)!important;
  box-shadow:0 4px 16px rgba(127,200,248,0.25)!important;
}
.btn-sky:hover{box-shadow:0 6px 24px rgba(127,200,248,0.35)!important;transform:translateY(-1px);}

.glow-pink{
  box-shadow:0 0 30px rgba(248,165,194,0.12),0 8px 24px rgba(196,160,232,0.08);
}

@keyframes heroIn{
  from{opacity:0;transform:translateY(20px);}
  to{opacity:1;transform:translateY(0);}
}

.pointer-events-none{pointer-events:none;}

@media (max-width:768px){
  .hero-min-height{min-height:60vh;}
}
@media (min-width:769px){
  .hero-min-height{min-height:calc(100vh - 64px);}
}

.profile-shell{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}

.profile-hero{
  position:relative;
  padding:1.5rem;
  background:
    radial-gradient(circle at top right, rgba(127,200,248,0.22), transparent 30%),
    radial-gradient(circle at bottom left, rgba(248,165,194,0.24), transparent 36%),
    rgba(255,255,255,0.78);
}

.profile-hero__glow{
  position:absolute;
  inset:auto -3rem -4rem auto;
  width:11rem;
  height:11rem;
  border-radius:9999px;
  background:radial-gradient(circle, rgba(196,160,232,0.4), transparent 68%);
  filter:blur(6px);
  pointer-events:none;
}

.profile-hero__content{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}

.profile-hero__identity{
  display:flex;
  align-items:center;
  gap:1rem;
}

.profile-avatar{
  width:4.5rem;
  height:4.5rem;
  border-radius:1.5rem;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:1.5rem;
  background:linear-gradient(135deg,var(--lavender-dk),var(--sky));
  box-shadow:0 12px 32px rgba(160,112,208,0.28);
}

.profile-eyebrow,
.profile-panel__eyebrow,
.profile-stat__label{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:rgba(42,32,53,.55);
}

.profile-title{
  margin:.15rem 0;
  font-size:clamp(1.8rem, 3vw, 2.6rem);
  line-height:1.05;
  color:#2a2035;
}

.profile-subtitle{
  margin:0;
  color:rgba(42,32,53,.72);
}

.profile-actions{
  position:relative;
  z-index:1;
}

.profile-badges{
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  margin-top:1.1rem;
}

.profile-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:1rem;
}

.profile-stat{
  display:flex;
  align-items:center;
  gap:1rem;
  padding:1.1rem 1.2rem;
}

.profile-stat__icon{
  width:3rem;
  height:3rem;
  flex:0 0 auto;
  border-radius:1rem;
  display:grid;
  place-items:center;
  color:#a070d0;
  background:linear-gradient(135deg, rgba(196,160,232,.22), rgba(127,200,248,.16));
}

.profile-stat__value{
  margin:.2rem 0 0;
  font-weight:700;
  color:#2a2035;
}

.profile-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:1rem;
}

.profile-panel{
  padding:1.25rem;
}

.profile-panel__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1rem;
}

.profile-panel__title{
  margin:.2rem 0 0;
  font-size:1.2rem;
  color:#2a2035;
}

.profile-detail-list{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}

.profile-detail-row{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:flex-start;
  padding:.8rem .95rem;
  border-radius:1rem;
  background:rgba(255,255,255,.52);
  border:1px solid rgba(248,165,194,.12);
}

.profile-detail-row span:first-child{
  color:rgba(42,32,53,.62);
  white-space:nowrap;
}

.profile-detail-row strong,
.profile-detail-row code,
.profile-detail-row span:last-child{
  text-align:right;
  word-break:break-word;
}

.profile-security-list,
.profile-form-stack{
  display:flex;
  flex-direction:column;
  gap:1rem;
}

.profile-security-item,
.profile-form-card{
  padding:1rem;
  border-radius:1rem;
  background:rgba(255,255,255,.56);
  border:1px solid rgba(248,165,194,.12);
}

.profile-security-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

.profile-security-item h3,
.profile-form-card__head h3{
  margin:0 0 .25rem;
  font-size:1rem;
  color:#2a2035;
}

.profile-security-item p,
.profile-form-card__head p{
  margin:0;
  font-size:.92rem;
  color:rgba(42,32,53,.62);
}

.profile-form-card{
  display:flex;
  flex-direction:column;
  gap:.9rem;
}

@media (max-width:960px){
  .profile-stats,
  .profile-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .profile-hero{
    padding:1.15rem;
  }

  .profile-hero__identity{
    align-items:flex-start;
  }

  .profile-avatar{
    width:3.8rem;
    height:3.8rem;
    border-radius:1.2rem;
  }

  .profile-detail-row,
  .profile-security-item{
    flex-direction:column;
  }

  .profile-detail-row strong,
  .profile-detail-row code,
  .profile-detail-row span:last-child{
    text-align:left;
  }
}

/* ── Markdown Content Styles ── */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

.markdown-content h1 { font-size: 1.5em; }
.markdown-content h2 { font-size: 1.3em; }
.markdown-content h3 { font-size: 1.15em; }

.markdown-content p {
  margin-bottom: 0.75em;
  line-height: 1.7;
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 0.75em;
  padding-left: 1.5em;
}

.markdown-content li {
  margin-bottom: 0.25em;
}

.markdown-content code {
  background: rgba(0,0,0,0.05);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

.markdown-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 0.75em;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.markdown-content blockquote {
  border-left: 4px solid var(--lavender);
  padding-left: 1em;
  margin-left: 0;
  margin-bottom: 0.75em;
  color: rgba(42, 32, 53, 0.7);
}

.markdown-content a {
  color: var(--lavender-dk);
  text-decoration: underline;
}

.markdown-content a:hover {
  color: var(--lavender);
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.75em 0;
  box-shadow: 0 2px 12px rgba(150,120,160,0.12);
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75em;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0.5em;
  text-align: left;
}

.markdown-content th {
  background: rgba(0,0,0,0.05);
  font-weight: 600;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin: 1.5em 0;
}

/* ── Markdown Editor ── */
.md-editor {
  position: relative;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.md-editor__toolbar {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-wrap: wrap;
}

.md-editor__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: rgba(42,32,53,0.6);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
  touch-action: manipulation;
}

.md-editor__btn:hover {
  background: rgba(196,160,232,0.15);
  color: var(--lavender-dk);
}

.md-editor__btn:focus-visible {
  outline: 2px solid var(--lavender-dk);
  outline-offset: 1px;
}

.md-editor__btn--upload {
  color: var(--lavender-dk);
}

.md-editor__btn--toggle.active {
  background: rgba(196,160,232,0.2);
  color: var(--lavender-dk);
}

.md-editor__divider {
  width: 1px;
  height: 1.25rem;
  background: rgba(0,0,0,0.1);
  margin: 0 0.25rem;
}

.md-editor__spacer {
  flex: 1;
}

.md-editor__body {
  position: relative;
}

.md-editor__textarea {
  border: none !important;
  border-radius: 0 !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
}

.md-editor__textarea:focus {
  outline: none;
  box-shadow: none;
}

.md-editor__preview {
  padding: 1rem 1.25rem;
  min-height: 240px;
  max-height: 600px;
  overflow-y: auto;
}

.md-editor__preview[hidden] {
  display: none !important;
}

.md-editor__drag-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(196,160,232,0.15);
  backdrop-filter: blur(4px);
  color: var(--lavender-dk);
  pointer-events: none;
  z-index: 10;
  border-radius: 0.5rem;
}

.md-editor__drag-hint[hidden] {
  display: none !important;
}

.md-editor__upload-status {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: rgba(42,32,53,0.6);
  background: rgba(0,0,0,0.02);
  border-top: 1px solid rgba(0,0,0,0.08);
}

.md-editor__upload-status[hidden] {
  display: none !important;
}

.md-editor__upload-status--error {
  color: #dc2626;
}

.md-editor__upload-status--success {
  color: #16a34a;
}

@media (prefers-reduced-motion: reduce) {
  .md-editor__btn {
    transition: none;
  }
}

/* ── Image Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  padding: 2rem;
  overscroll-behavior: contain;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.5rem;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  touch-action: manipulation;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__close {
    transition: none;
  }
}

/* ── Announcement List (列表页 - 三段式行布局) ── */
.ann-list {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(248,165,194,0.15);
  border-radius: 1rem;
  overflow: hidden;
}

/* 单行：左(封面+标题+摘要) 中(标签) 右(时间+操作) */
.ann-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.18s;
  text-decoration: none;
  color: inherit;
}

.ann-row:last-child {
  border-bottom: none;
}

.ann-row:hover {
  background: #fafafa;
}

.ann-row--pinned {
  background: rgba(251,191,36,0.04);
}

.ann-row--pinned:hover {
  background: rgba(251,191,36,0.08);
}

/* 左侧：核心信息 */
.ann-row__main {
  display: flex;
  gap: 1.125rem;
  flex: 1;
  min-width: 0;
}

.ann-row__thumb {
  flex-shrink: 0;
  width: 104px;
  height: 78px;
  border-radius: 0.625rem;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
}

.ann-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ann-row:hover .ann-row__thumb img {
  transform: scale(1.06);
}

.ann-row__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(196,160,232,0.08), rgba(248,165,194,0.06));
  color: rgba(42,32,53,0.2);
  font-size: 1.4rem;
}

.ann-row__content {
  flex: 1;
  min-width: 0;
}

.ann-row__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.45rem;
  color: #2a2035;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

.ann-row:hover .ann-row__title {
  color: var(--color-lavender-dk);
}

.ann-row__summary {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(42,32,53,0.5);
  margin: 0 0 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 标题下方的作者/阅读数/阅读全文行 */
.ann-row__sub {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(42,32,53,0.4);
}

.ann-row__author {
  color: rgba(42,32,53,0.4);
  font-weight: 500;
}

.ann-row__author::before {
  content: '·';
  margin-right: 0.625rem;
  color: rgba(42,32,53,0.25);
}

.ann-row__views {
  display: inline-flex;
  align-items: center;
  color: rgba(42,32,53,0.35);
}

/* 阅读全文：默认隐藏，hover 显示 */
.ann-row__readmore {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-lavender-dk);
  margin-left: auto;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}

.ann-row:hover .ann-row__readmore {
  opacity: 1;
  transform: translateX(0);
}

/* 中间：分类标签 */
.ann-row__tag {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-top: 0.2rem;
}

.ann-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.ann-tag--公告 {
  background: rgba(196,160,232,0.12);
  color: #6b46c1;
}

.ann-tag--更新 {
  background: rgba(59,130,246,0.12);
  color: #2563eb;
}

.ann-tag--维护 {
  background: rgba(251,191,36,0.14);
  color: #92400e;
}

.ann-tag--活动 {
  background: rgba(34,197,94,0.12);
  color: #15803d;
}

.ann-tag--pin {
  background: rgba(251,191,36,0.9);
  color: #92400e;
}

/* 右侧：时间 + 操作 */
.ann-row__side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding-top: 0.1rem;
}

.ann-row__date {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(42,32,53,0.45);
  white-space: nowrap;
  cursor: help;
}

.ann-row__actions {
  display: flex;
  gap: 0.2rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.ann-row:hover .ann-row__actions {
  opacity: 1;
}

/* 移动端 */
@media (max-width: 640px) {
  .ann-row {
    flex-wrap: wrap;
    padding: 1.1rem 1.25rem;
    gap: 0.75rem;
  }
  .ann-row__thumb {
    width: 72px;
    height: 54px;
  }
  .ann-row__title {
    font-size: 1.05rem;
  }
  .ann-row__summary {
    -webkit-line-clamp: 1;
  }
  .ann-row__tag {
    order: 3;
  }
  .ann-row__side {
    order: 2;
  }
  .ann-row__readmore {
    display: none;
  }
}

/* ── Announcement Detail (详情页) ── */
.ann-detail__paper {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(248,165,194,0.15);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  box-shadow: 0 4px 32px rgba(150,120,160,0.10);
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .ann-detail__paper {
    padding: 1.25rem 1rem;
  }
}

.ann-detail__cover {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(150,120,160,0.12);
}

.ann-detail__cover img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
}

.ann-detail__header {
  margin-bottom: 2rem;
}

.ann-detail__tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ann-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(42,32,53,0.5);
}

.ann-detail__author-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ann-detail__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(196,160,232,0.2);
  flex-shrink: 0;
}

.ann-detail__author {
  font-weight: 600;
  color: rgba(42,32,53,0.7);
}

.ann-detail__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  color: #2a2035;
  margin: 0 0 1rem;
}

.ann-detail__content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(42,32,53,0.82);
}

.ann-detail__content h1 { font-size: 1.6em; }
.ann-detail__content h2 { font-size: 1.35em; }

.ann-detail__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.ann-detail__divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 2.5rem 0;
}

.ann-detail__related-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2a2035;
  margin: 0 0 1rem;
}

/* ── Related Card (详情页底部相关公告) ── */
.ann-related-card {
  display: block;
  text-decoration: none;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(248,165,194,0.12);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ann-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(150,120,160,0.1);
}

.ann-related-card__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
}

.ann-related-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ann-related-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(196,160,232,0.08), rgba(248,165,194,0.06));
}

.ann-related-card__body {
  padding: 0.75rem 0.875rem;
}

.ann-related-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: #2a2035;
  margin: 0 0 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ann-related-card__date {
  font-size: 0.7rem;
  color: rgba(42,32,53,0.4);
}

/* ── Cover Uploader (表单) ── */
.cover-uploader {
  width: 100%;
}

.cover-uploader__preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px dashed rgba(196,160,232,0.3);
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(196,160,232,0.03);
}

.cover-uploader__preview:hover {
  border-color: var(--lavender-dk);
  background: rgba(196,160,232,0.06);
}

.cover-uploader--dragging .cover-uploader__preview {
  border-color: var(--lavender-dk);
  background: rgba(196,160,232,0.12);
}

.cover-uploader__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-uploader__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(42,32,53,0.4);
}

.cover-uploader__status {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  color: rgba(42,32,53,0.5);
}

.cover-uploader__status--error { color: #dc2626; }
.cover-uploader__status--success { color: #16a34a; }

.cover-uploader__btn--remove.hidden { display: none; }

.cover-uploader__tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.625rem;
}

.cover-uploader__tab {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 0.375rem;
  background: transparent;
  color: rgba(42,32,53,0.5);
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
}

.cover-uploader__tab:hover {
  border-color: rgba(196,160,232,0.4);
  color: var(--lavender-dk);
}

.cover-uploader__tab.active {
  background: rgba(196,160,232,0.12);
  border-color: var(--lavender);
  color: var(--lavender-dk);
}

.cover-uploader__tab:focus-visible {
  outline: 2px solid var(--lavender-dk);
  outline-offset: 1px;
}

.cover-uploader__controls {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.cover-uploader__controls[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .cover-uploader__tab {
    transition: none;
  }
}

/* ── Home Announcement Preview (首页公告预览) ── */
.home-ann-item {
  display: flex;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(248,165,194,0.1);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.home-ann-item:last-child { border-bottom: none; }

.home-ann-item:hover {
  background: rgba(196,160,232,0.04);
}

.home-ann-item--pinned {
  background: rgba(251,191,36,0.04);
}

.home-ann-item__cover {
  flex: 0 0 4rem;
  width: 4rem;
  height: 4rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
}

.home-ann-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-ann-item__body {
  flex: 1;
  min-width: 0;
}

/* line-clamp-2 polyfill */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .ann-row,
  .ann-row__thumb img,
  .ann-related-card {
    transition: none;
  }
}
