/* 首页弹窗共用生命周期，公告内容与旧图片素材分别布局。 */
.home-popup[hidden],.home-popup [hidden]{display:none!important}
.home-popup{
  --home-popup-top:max(24px,env(safe-area-inset-top));
  --home-popup-bottom:max(24px,env(safe-area-inset-bottom));
  --home-popup-gold:var(--color-primary,#ffd21c);
  position:fixed;inset:0;z-index:2147482000;
  display:flex;align-items:center;justify-content:center;
  box-sizing:border-box;padding:24px 16px;
  padding-top:var(--home-popup-top);padding-bottom:var(--home-popup-bottom);
  background:rgba(0,0,0,.76);overscroll-behavior:contain
}
.home-popup__dialog{
  position:relative;flex:0 1 auto;min-width:0;
  max-width:420px;max-height:calc(100vh - 48px);
  max-height:calc(100dvh - var(--home-popup-top) - var(--home-popup-bottom));
  border-radius:12px;line-height:0;outline:none;
  background:var(--hg-card-bg,#171616);box-shadow:0 20px 80px rgba(0,0,0,.55)
}
.home-popup__link{display:block;max-width:100%;border-radius:inherit}
.home-popup img.home-popup__image{
  display:block;width:auto;height:auto;max-width:100%;
  max-height:calc(100vh - 48px);
  max-height:calc(100dvh - var(--home-popup-top) - var(--home-popup-bottom));
  object-fit:contain;border-radius:12px
}
.home-popup .home-popup__close{
  position:absolute;top:8px;right:8px;z-index:1;
  display:flex;align-items:center;justify-content:center;flex:none;
  box-sizing:border-box;width:40px;height:40px;min-height:0;margin:0;padding:0;
  border:1px solid rgba(255,255,255,.7);border-radius:50%;
  background:rgba(0,0,0,.8);color:#fff;
  font:normal 30px/1 Arial,sans-serif;cursor:pointer
}
.home-popup .home-popup__close:focus-visible,.home-popup__link:focus-visible,
.home-popup .home-popup__save:focus-visible,.home-popup__action:focus-visible,.home-popup__value a:focus-visible{
  outline:3px solid var(--home-popup-gold);outline-offset:3px
}
.home-popup__notice-dialog{
  display:flex;flex-direction:column;width:680px;max-width:100%;
  border:1px solid #49422b;border-radius:16px;overflow:hidden;
  color:#efede5;font-family:inherit;line-height:1.65;text-align:left
}
.home-popup__topbar{
  display:flex;align-items:center;justify-content:space-between;flex:none;min-height:54px;
  box-sizing:border-box;padding:8px 18px 8px 28px;border-bottom:1px solid #353020;
  background:linear-gradient(110deg,#29261a,#1d1b17)
}
.home-popup__countdown{min-width:0;color:#c5bd9e;font-size:13px;overflow-wrap:anywhere}
.home-popup__notice-dialog .home-popup__close{
  position:static;width:34px;height:34px;margin-left:auto;border:0;border-radius:8px;
  background:transparent;color:#d9d1b2;font-size:28px
}
.home-popup__notice-dialog .home-popup__close:hover{background:#443c22;color:var(--home-popup-gold)}
.home-popup__body{
  min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  padding:26px 30px 30px;scrollbar-width:thin;scrollbar-color:#665625 #211e17;
  -webkit-overflow-scrolling:touch
}
.home-popup__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:22px}
.home-popup .home-popup__title{
  min-width:0;margin:0;padding:0;border:0;color:var(--home-popup-gold);
  font-size:25px;font-weight:700;line-height:1.45;overflow-wrap:anywhere
}
.home-popup .home-popup__save{
  flex:none;max-width:48%;margin:0;padding:8px 13px;border:1px solid #8a7020;border-radius:8px;
  background:#332b13;color:var(--home-popup-gold);
  font-family:inherit;font-size:13px;line-height:1.5;font-weight:600;white-space:normal;
  overflow-wrap:anywhere;cursor:pointer;transition:background .15s
}
.home-popup .home-popup__save:hover{background:#4a3b13}
.home-popup .home-popup__save:disabled{opacity:.6;cursor:wait}
.home-popup__rows{margin:0;padding:0}
.home-popup__row{display:block;margin:0 0 13px;font-size:17px;line-height:1.65}
/* 标签和内容共享整行，避免标签被固定列宽提前拆开、长内容只能在右列换行。 */
.home-popup__label{display:inline;margin:0 8px 0 0;font-weight:600;overflow-wrap:anywhere}
.home-popup__label::after{content:'：'}
.home-popup__value{display:inline;margin:0;overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap}
.home-popup__value a{color:inherit;text-decoration:underline;text-decoration-color:#75652b;text-underline-offset:4px}
.home-popup__value a:hover{color:var(--home-popup-gold)}
.home-popup__notices{margin:22px 0 0;padding:18px 0 0;border-top:1px solid #393222}
.home-popup__line{margin:0 0 10px;color:#c5c1b4;font-size:15px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.home-popup .home-popup__highlight{color:var(--home-popup-gold);font-weight:600}
/* 优先给完整地址留足宽度，窄屏自动单列，避免把域名尾字母挤成孤行。 */
.home-popup__actions{display:grid;grid-template-columns:minmax(0,1fr);grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:13px;margin-top:24px}
.home-popup .home-popup__action{
  display:flex;align-items:center;justify-content:center;min-width:0;min-height:49px;box-sizing:border-box;
  margin:0;padding:12px 15px;border:1px solid #f9cb22;border-radius:9px;
  background:var(--hg-btn-gradient,linear-gradient(135deg,#ffd21c,#f5a623));color:#261d07;
  font-size:16px;font-weight:700;line-height:1.5;text-align:center;text-decoration:none;
  white-space:normal;overflow-wrap:anywhere;transition:filter .15s
}
.home-popup .home-popup__action:hover{color:#261d07;filter:brightness(1.1)}
.home-popup__status{margin:20px 0 12px;color:var(--home-popup-gold);font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.home-popup .home-popup__body img.home-popup__preview{display:block;width:100%;height:auto;max-width:100%;margin-top:12px;border:1px solid #625121;border-radius:8px;box-sizing:border-box;object-fit:contain;user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default}
@media(max-width:480px){
  .home-popup{padding-right:12px;padding-left:12px}
  .home-popup__dialog{max-width:100%}
  .home-popup__notice-dialog{border-radius:12px}
  .home-popup__topbar{padding-left:18px;padding-right:10px}
  .home-popup__body{padding:20px 18px 22px}
  .home-popup__heading{gap:12px;margin-bottom:19px}
  .home-popup .home-popup__title{font-size:21px}
  .home-popup .home-popup__save{padding:7px 9px;font-size:12px}
  .home-popup__row{font-size:15px}
  .home-popup__label{margin-right:5px}
  .home-popup__line{font-size:14px}
  .home-popup__actions{gap:10px;margin-top:20px}
  .home-popup .home-popup__action{font-size:14px;padding:11px 9px}
}
@media(max-width:350px){
  .home-popup__heading{flex-wrap:wrap}
  .home-popup .home-popup__save{margin-left:auto;max-width:100%}
}
