/* ============================================================
   星核 · 進站公告彈窗
   CSP style-src 'self'：所有樣式必須寫在這裡，禁止內聯 style
   ============================================================ */

.xh-notice-layer{
  position:fixed; inset:0; z-index:9000;
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.xh-notice-layer[hidden]{display:none}

.xh-notice-scrim{
  position:absolute; inset:0;
  background:
    radial-gradient(1200px 600px at 50% 0%, rgba(217,178,106,.10), transparent 65%),
    rgba(4,4,6,.82);
  -webkit-backdrop-filter:blur(7px) saturate(120%);
  backdrop-filter:blur(7px) saturate(120%);
  animation:xh-fade .35s ease both;
}

/* ---------- 主體卡片 ---------- */
.xh-notice{
  position:relative;
  width:min(540px, 100%);
  max-height:min(88vh, 760px);
  overflow:auto;
  padding:34px 32px 28px;
  border-radius:22px;
  border:1px solid transparent;
  background:
    radial-gradient(900px 320px at 50% -12%, rgba(217,178,106,.20), transparent 62%),
    linear-gradient(158deg,#15151a 0%,#0c0c0f 52%,#111114 100%) padding-box,
    linear-gradient(150deg, rgba(240,217,168,.75), rgba(120,100,60,.25) 42%, rgba(240,217,168,.6)) border-box;
  box-shadow:
    0 40px 120px rgba(0,0,0,.78),
    0 2px 0 rgba(255,255,255,.05) inset,
    0 0 0 1px rgba(0,0,0,.6);
  color:#e9e7e2;
  animation:xh-rise .5s cubic-bezier(.22,1,.36,1) both;
  scrollbar-width:thin; scrollbar-color:#3a3a40 transparent;
}
.xh-notice::-webkit-scrollbar{width:6px}
.xh-notice::-webkit-scrollbar-thumb{background:#3a3a40;border-radius:6px}

/* 星點背景 */
.xh-notice::before{
  content:""; position:absolute; inset:0; border-radius:22px; pointer-events:none;
  background-image:
    radial-gradient(1.4px 1.4px at 18% 22%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 78% 14%, rgba(240,217,168,.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 88% 62%, rgba(255,255,255,.32), transparent 60%),
    radial-gradient(1.1px 1.1px at 32% 78%, rgba(240,217,168,.5), transparent 60%),
    radial-gradient(1.3px 1.3px at 62% 88%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(1px 1px at 8% 55%, rgba(255,255,255,.35), transparent 60%);
  opacity:.75;
  animation:xh-twinkle 6s ease-in-out infinite alternate;
}

/* ---------- 徽章 ---------- */
.xh-notice-badge{
  position:relative;
  display:inline-flex; align-items:center; gap:8px;
  padding:5px 13px 5px 11px;
  border-radius:999px;
  border:1px solid rgba(240,217,168,.35);
  background:linear-gradient(180deg, rgba(240,217,168,.14), rgba(240,217,168,.05));
  font-size:11px; letter-spacing:.18em; font-weight:600;
  color:#f0d9a8;
  font-family:"PingFang TC","Microsoft JhengHei",-apple-system,sans-serif;
}
.xh-notice-badge i{
  width:6px; height:6px; border-radius:50%;
  background:#f0d9a8;
  box-shadow:0 0 0 0 rgba(240,217,168,.7);
  animation:xh-pulse 2.2s infinite;
}

/* ---------- 標題 ---------- */
.xh-notice h2{
  position:relative;
  margin:18px 0 0;
  font-size:clamp(27px, 6.4vw, 36px);
  line-height:1.24;
  letter-spacing:.02em;
  font-weight:700;
  font-family:"Songti TC","Noto Serif TC","Source Han Serif TC","PMingLiU",Georgia,serif;
  color:#f7f3ea;
}
.xh-notice h2 em{
  display:inline-block;
  font-style:normal;
  background:linear-gradient(180deg,#fff8e6 0%,#f0d9a8 42%,#c69a4b 100%);
  -webkit-background-clip:text; background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 18px rgba(240,217,168,.35));
}
.xh-notice h2::after{
  content:""; display:block; width:64px; height:2px; margin-top:16px;
  background:linear-gradient(90deg,#f0d9a8,rgba(240,217,168,0));
  border-radius:2px;
}

.xh-notice-lead{
  position:relative;
  margin:16px 0 0;
  font-size:13.5px; line-height:1.85;
  color:#a9a7a1;
  letter-spacing:.01em;
}

/* ---------- 條目 ---------- */
.xh-notice-list{
  position:relative;
  margin:22px 0 0; padding:0; list-style:none;
  display:grid; gap:14px;
}
.xh-notice-list li{
  display:grid; grid-template-columns:34px 1fr; gap:12px;
  align-items:start;
}
.xh-notice-icon{
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:10px;
  border:1px solid rgba(240,217,168,.28);
  background:linear-gradient(160deg, rgba(240,217,168,.13), rgba(240,217,168,.03));
  color:#f0d9a8;
}
.xh-notice-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.xh-notice-list strong{
  display:block;
  font-size:13.5px; font-weight:600; color:#f2efe8;
  letter-spacing:.01em;
  font-family:"PingFang TC","Microsoft JhengHei",-apple-system,sans-serif;
}
.xh-notice-list p{
  margin:4px 0 0;
  font-size:12.5px; line-height:1.7; color:#8f8d88;
}

/* ---------- 小字 ---------- */
.xh-notice-note{
  position:relative;
  margin:22px 0 0; padding:12px 14px;
  border-radius:10px;
  border:1px dashed rgba(255,255,255,.10);
  background:rgba(255,255,255,.022);
  font-size:11.5px; line-height:1.75; color:#7d7b76;
}

/* ---------- 按鈕 ---------- */
.xh-notice-cta{
  position:relative;
  display:block; width:100%; margin-top:20px;
  padding:14px 18px;
  border:0; border-radius:12px;
  background:linear-gradient(180deg,#f7ecd2 0%,#e2c891 55%,#cbaa6b 100%);
  color:#1b1508;
  font-size:14.5px; font-weight:700; letter-spacing:.06em;
  font-family:"PingFang TC","Microsoft JhengHei",-apple-system,sans-serif;
  cursor:pointer;
  box-shadow:0 10px 30px rgba(203,170,107,.22), 0 1px 0 rgba(255,255,255,.5) inset;
  transition:transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease, filter .18s ease;
}
.xh-notice-cta:hover{filter:brightness(1.05); box-shadow:0 14px 38px rgba(203,170,107,.3), 0 1px 0 rgba(255,255,255,.55) inset}
.xh-notice-cta:active{transform:translateY(1px) scale(.995)}
.xh-notice-cta:focus-visible{outline:2px solid #f0d9a8; outline-offset:3px}

/* ---------- 關閉 ---------- */
.xh-notice-close{
  position:absolute; top:14px; right:14px;
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:#b9b6af; cursor:pointer;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}
.xh-notice-close:hover{background:rgba(255,255,255,.10); color:#fff; transform:rotate(90deg)}
.xh-notice-close:focus-visible{outline:2px solid #f0d9a8; outline-offset:2px}
.xh-notice-close svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

/* ---------- 左下角重開入口 ---------- */
.xh-notice-pill{
  position:fixed; left:16px; bottom:16px; z-index:8000;
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 15px 9px 12px;
  border-radius:999px;
  border:1px solid rgba(240,217,168,.30);
  background:linear-gradient(180deg, rgba(21,21,26,.96), rgba(12,12,15,.96));
  color:#f0d9a8; cursor:pointer;
  font-size:12px; font-weight:600; letter-spacing:.05em;
  font-family:"PingFang TC","Microsoft JhengHei",-apple-system,sans-serif;
  box-shadow:0 10px 30px rgba(0,0,0,.55);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  transition:transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease;
}
.xh-notice-pill[hidden]{display:none}
.xh-notice-pill:hover{transform:translateY(-2px); box-shadow:0 14px 36px rgba(0,0,0,.62)}
.xh-notice-pill:focus-visible{outline:2px solid #f0d9a8; outline-offset:3px}
.xh-notice-pill svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---------- 動效 ---------- */
body.xh-notice-open{overflow:hidden}

@keyframes xh-fade{from{opacity:0}to{opacity:1}}
@keyframes xh-rise{
  from{opacity:0; transform:translateY(22px) scale(.97)}
  to{opacity:1; transform:translateY(0) scale(1)}
}
@keyframes xh-twinkle{from{opacity:.45}to{opacity:.9}}
@keyframes xh-pulse{
  0%{box-shadow:0 0 0 0 rgba(240,217,168,.65)}
  70%{box-shadow:0 0 0 7px rgba(240,217,168,0)}
  100%{box-shadow:0 0 0 0 rgba(240,217,168,0)}
}

/* ---------- 手機 ---------- */
@media (max-width:560px){
  .xh-notice{padding:28px 20px 22px; border-radius:18px; max-height:86vh}
  .xh-notice-badge{font-size:10px}
  .xh-notice-list{gap:12px}
  .xh-notice-list li{grid-template-columns:30px 1fr; gap:10px}
  .xh-notice-icon{width:30px;height:30px;border-radius:9px}
  .xh-notice-icon svg{width:15px;height:15px}
  .xh-notice-pill{left:12px; bottom:12px; padding:8px 13px; font-size:11px}
}

/* ---------- 減少動效偏好 ---------- */
@media (prefers-reduced-motion:reduce){
  .xh-notice,.xh-notice-scrim,.xh-notice-badge i,.xh-notice::before{animation:none!important}
  .xh-notice-cta:hover,.xh-notice-close:hover,.xh-notice-pill:hover{transform:none}
}
