.announcement-rich { font-size:15px; line-height:1.9; overflow-wrap:anywhere; color:var(--site-ink,var(--ink)); }
.msg-detail-content.announcement-rich { white-space:normal; }
.announcement-rich :is(p,ul,ol,blockquote) { margin:0 0 1em; }
.announcement-rich :is(h2,h3) { font-size:1.2em; margin:1.2em 0 .5em; line-height:1.6; }
.announcement-rich img { display:block; max-width:100%; height:auto; border-radius:10px; margin:16px auto; }
.announcement-rich a { color:var(--site-accent,var(--accent)); text-decoration:underline; }
.announcement-rich blockquote { margin-left:0; padding-left:16px; border-left:3px solid var(--site-accent,var(--accent)); color:var(--site-muted,var(--ink-light)); }
.announcement-dialog { box-sizing:border-box; width:min(720px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); margin:auto; padding:0; color:var(--site-ink,var(--ink)); background:var(--site-paper,var(--card)); border:1px solid color-mix(in srgb,var(--site-border,var(--border)) 50%,transparent); border-radius:24px; box-shadow:0 24px 80px #16112c30; font-family:inherit; overflow:hidden; }
.announcement-dialog[open] { display:flex; flex-direction:column; }
.announcement-dialog-home { height:min(720px,calc(100vh - 32px)); height:min(720px,calc(100svh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))); }
.announcement-dialog:focus { outline:none; }
.announcement-dialog::backdrop { background:#1e203d66; backdrop-filter:blur(4px); }
.announcement-dialog-head { position:relative; isolation:isolate; padding:24px 60px; background:linear-gradient(115deg,var(--site-paper,var(--card)),var(--site-soft,var(--paper))); border-bottom:1px solid color-mix(in srgb,var(--site-border,var(--border)) 45%,transparent); flex:none; overflow:hidden; }
.announcement-dialog-head::after { content:''; position:absolute; z-index:-1; width:112px; height:112px; right:42px; top:-81px; border:1px solid color-mix(in srgb,var(--site-accent,var(--accent)) 20%,transparent); border-radius:50%; box-shadow:0 0 0 12px color-mix(in srgb,var(--site-accent,var(--accent)) 4%,transparent),0 0 0 24px color-mix(in srgb,var(--site-accent,var(--accent)) 3%,transparent); pointer-events:none; }
.announcement-dialog-title { margin:0; color:var(--site-ink,var(--ink)); font-family:inherit; font-size:21px; font-weight:700; line-height:1.5; text-align:center; overflow-wrap:anywhere; }
.announcement-dialog .announcement-title-toggle { display:block; width:100%; padding:0; margin:0; border:0; border-radius:4px; box-shadow:none; background:transparent; color:inherit; font:inherit; text-align:inherit; cursor:pointer; }
.announcement-dialog .announcement-title-toggle:disabled { opacity:1; cursor:default; }
.announcement-title-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; max-height:4.5em; overflow:hidden; overflow-wrap:anywhere; }
.announcement-title-hint { display:block; margin-top:6px; color:var(--site-muted,var(--ink-light)); font-size:11px; font-weight:400; line-height:1.5; }
.announcement-title-hint[hidden],.announcement-title-full[hidden] { display:none; }
.announcement-title-full { margin:0 0 18px; padding:0 0 16px; border-bottom:1px solid var(--site-border,var(--border)); }
.announcement-title-copy { margin:0; color:var(--site-ink,var(--ink)); font:inherit; font-size:16px; font-weight:600; line-height:1.8; overflow-wrap:anywhere; white-space:pre-wrap; }
.announcement-dialog .announcement-close { position:absolute; top:14px; right:10px; display:grid; place-items:center; width:44px; height:44px; padding:10px; margin:0; border:0; border-radius:50%; background:transparent; color:var(--site-muted,var(--ink-light)); box-shadow:none; font:inherit; line-height:1; cursor:pointer; }
.announcement-close svg { width:22px; height:22px; }
.announcement-dialog .announcement-close:hover { background:color-mix(in srgb,var(--site-accent,var(--accent)) 7%,transparent); color:var(--site-ink,var(--ink)); transform:none; }
.announcement-dialog .announcement-close:focus:not(:focus-visible) { outline:none; }
.announcement-dialog-body { position:relative; display:flex; flex:1 1 auto; min-height:0; }
.announcement-dialog-scroll { flex:1 1 auto; padding:24px 28px 12px; overflow-y:auto; min-height:0; overscroll-behavior:contain; scrollbar-width:thin; }
.announcement-dialog .announcement-rich { font-size:15px; line-height:1.85; }
.announcement-dialog .announcement-rich > :last-child { margin-bottom:0; }
.announcement-nav { position:absolute; z-index:2; top:50%; display:grid; place-items:center; width:44px; height:60px; padding:0; transform:translateY(-50%); border:1px solid var(--site-border); border-radius:14px; color:var(--site-accent); background:color-mix(in srgb,var(--site-paper,var(--card)) 90%,transparent); box-shadow:0 5px 18px #17132b20; font:inherit; font-size:34px; line-height:1; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .16s ease,background-color .16s ease,transform .16s ease; }
.announcement-prev { left:10px; }
.announcement-next { right:10px; }
.announcement-dialog:hover .announcement-nav:not([hidden]),.announcement-nav:focus-visible { opacity:1; pointer-events:auto; }
.announcement-nav:hover { background:var(--site-paper,var(--card)); transform:translateY(-50%) scale(1.04); }
.announcement-nav[hidden] { display:none; }
.announcement-banner { width:100%; max-height:340px; object-fit:contain; display:block; border-radius:10px; margin:0 0 16px; background:var(--site-page); }
.announcement-banner:last-child { margin-bottom:0; }
.announcement-dialog-foot { display:flex; flex-direction:column; align-items:stretch; gap:8px; padding:16px 28px 20px; flex:none; }
.announcement-pages { display:flex; align-self:center; align-items:center; gap:4px; width:max-content; max-width:100%; overflow-x:auto; padding:4px 0; }
.announcement-buttons { display:flex; flex-direction:column; align-items:stretch; gap:4px; }
.announcement-dialog .announcement-dismiss { width:100%; min-height:48px; padding:12px 20px; margin:0; border:0; border-radius:14px; background:var(--site-action,var(--accent)); color:#fff; box-shadow:none; font:inherit; font-size:15px; font-weight:600; line-height:1.6; cursor:pointer; }
.announcement-dialog .announcement-dismiss:hover { background:var(--site-accent-hover,var(--accent-dark)); transform:none; box-shadow:none; }
.announcement-dialog .announcement-read { align-self:center; min-height:40px; padding:8px 14px; margin:0; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--site-muted,var(--ink-light)); font:inherit; font-size:12px; line-height:1.6; cursor:pointer; }
.announcement-dialog .announcement-read:hover:not(:disabled) { color:var(--site-accent,var(--accent)); background:var(--site-tint,var(--paper)); }
.announcement-dialog .announcement-read:disabled { opacity:.65; cursor:default; }
.announcement-dialog .announcement-read[hidden] { display:none; }
.announcement-pages[hidden] { display:none; }
.announcement-pages button { flex:none; width:32px; height:32px; padding:0; background:transparent; border:0; border-radius:16px; cursor:pointer; }
.announcement-dot::after { content:''; display:block; width:8px; height:8px; margin:auto; border-radius:8px; background:var(--site-muted); opacity:.25; transition:width .6s ease,background-color .6s ease; }
.announcement-dot[aria-current=true]::after { width:20px; background:var(--site-accent); opacity:1; }
.announcement-error { color:var(--site-error,#b34141); font-size:13px; line-height:1.6; }
.announcement-error:empty { display:none; }
.announcement-dialog :focus-visible { outline:2px solid var(--site-accent); outline-offset:3px; }
@media(max-width:600px){
  .announcement-dialog { border-radius:22px; }
  .announcement-dialog-head { padding:22px 52px; }
  .announcement-dialog-title { font-size:18px; }
  .announcement-dialog .announcement-close { top:12px; right:5px; }
  .announcement-dialog-scroll { padding:20px 20px 10px; }
  .announcement-dialog-foot { padding:14px 20px 16px; }
  .announcement-nav { width:36px; height:48px; font-size:30px; }
  .announcement-prev { left:4px; }.announcement-next { right:4px; }
}
@media(max-height:500px){
  .announcement-dialog-head { padding-block:12px; }
  .announcement-dialog .announcement-close { top:4px; }
  .announcement-dialog-scroll { padding-block:12px 6px; }
  .announcement-dialog-foot { padding-block:8px; gap:0; }
}
@media(max-width:600px),(max-height:500px){
  .announcement-dialog-home { height:min(720px,78vh); height:min(720px,78svh,calc(100svh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))); }
}
/* A portrait reading card on desktop; keep the established mobile dimensions above. */
@media(min-width:769px){
  .announcement-dialog { width:min(480px,calc(100vw - 48px)); max-height:min(720px,calc(100vh - 48px)); max-height:min(720px,calc(100svh - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))); }
  .announcement-dialog-home { height:min(720px,calc(100vh - 48px)); height:min(720px,calc(100svh - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))); }
}
/* Touch screens use swipe and page dots; arrows remain available with a mouse. */
@media(max-width:920px),(hover:none),(pointer:coarse){
  .announcement-nav { display:none; }
}
