/*
  博客园后台 → 设置 → 页面定制 CSS
  整段粘贴。不要勾选「禁用模板默认 CSS」，也不要换成 Custom 皮肤。
  只画 #dy-beacon / #dy-side / #dy-foot。网格布局不可用时这三块不显示。
*/

#dy-beacon,
#dy-side,
#dy-foot {
  display: none !important;
}

@supports (display: grid) {
  #dy-beacon,
  #dy-side,
  #dy-foot {
    color: #e8eef7 !important;
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    box-sizing: border-box !important;
  }

  #dy-beacon *,
  #dy-side *,
  #dy-foot * {
    box-sizing: border-box !important;
  }

  #dy-beacon {
    display: flex !important;
    position: relative;
    z-index: 1;
    clear: both;
    float: none !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px 22px;
    width: auto !important;
    max-width: none !important;
    margin: 0 0 18px !important;
    padding: 12px 18px !important;
    color: #e8eef7 !important;
    background-color: #10151d !important;
    background-image:
      linear-gradient(rgba(125, 211, 252, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px),
      radial-gradient(90% 140% at 0% 0%, rgba(59, 130, 246, 0.28), transparent 52%),
      linear-gradient(180deg, #1a2433 0%, #10151d 100%) !important;
    background-size: 18px 18px, 18px 18px, auto, auto !important;
    border: 1px solid rgba(125, 211, 252, 0.28) !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 40px rgba(8, 12, 20, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  }

  #dy-side,
  #dy-foot {
    display: block !important;
    clear: both;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  #dy-foot {
    margin: 28px 0 8px !important;
  }

  #dy-side {
    max-width: 360px !important;
  }

  .dy-panel {
    position: relative;
    margin: 0 !important;
    padding: 16px !important;
    overflow: hidden;
    color: #e8eef7 !important;
    background-color: #10151d !important;
    background-image:
      linear-gradient(rgba(125, 211, 252, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(125, 211, 252, 0.045) 1px, transparent 1px),
      radial-gradient(120% 80% at 0% 0%, rgba(59, 130, 246, 0.22), transparent 56%),
      linear-gradient(180deg, #182232 0%, #10151d 100%) !important;
    background-size: 16px 16px, 16px 16px, auto, auto !important;
    border: 1px solid rgba(125, 211, 252, 0.28) !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 44px rgba(8, 12, 20, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  }

  .dy-panel--row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    padding: 16px 18px !important;
  }

  .dy-foot__copy {
    flex: 1 1 240px;
    min-width: 0;
  }

  .dy-scan {
    display: none;
  }

  .dy-panel > *:not(.dy-scan) {
    position: relative;
    z-index: 1;
  }

  .dy-kicker,
  .dy-route,
  .dy-title,
  .dy-desc,
  .dy-nav,
  .dy-links,
  .dy-live {
    margin: 0 !important;
    padding: 0 !important;
  }

  .dy-kicker {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px !important;
    color: #e7c27a !important;
    font-family: "SFMono-Regular", "SF Mono", "JetBrains Mono", "Source Code Pro", ui-monospace, monospace !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase;
  }

  .dy-route {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px !important;
    color: #93a4b8 !important;
    font-family: "SFMono-Regular", "SF Mono", "JetBrains Mono", ui-monospace, monospace !important;
    font-size: 12px !important;
  }

  .dy-route__line {
    position: relative;
    display: block;
    flex: 1 1 auto;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #e7c27a) !important;
  }

  .dy-route__line::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7dd3fc;
    box-shadow: 0 0 10px #7dd3fc;
    animation: dy-run 2.8s ease-in-out infinite alternate;
  }

  .dy-title {
    margin: 0 0 6px !important;
    color: #f4f8fc !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }

  #dy-foot .dy-title {
    font-size: 16px !important;
  }

  .dy-desc {
    margin: 0 0 14px !important;
    color: #b7c5d6 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  #dy-foot .dy-desc {
    margin-bottom: 0 !important;
  }

  .dy-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #f4f8fc !important;
    text-decoration: none !important;
  }

  .dy-brand__text {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
  }

  .dy-brand__text strong {
    color: #f4f8fc !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  .dy-brand__text small {
    color: #8fb8d8 !important;
    font-family: "SFMono-Regular", "SF Mono", ui-monospace, monospace !important;
    font-size: 12px !important;
  }

  .dy-mark {
    position: relative;
    display: grid !important;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: #0d131c !important;
    box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.45), 0 0 18px rgba(125, 211, 252, 0.2);
  }

  .dy-mark i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7dd3fc;
    box-shadow: 0 0 12px #7dd3fc;
  }

  .dy-mark::before {
    content: none;
  }

  .dy-nav {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  #dy-beacon .dy-nav {
    justify-content: flex-end;
    flex: 1 1 auto;
  }

  .dy-links {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px !important;
    list-style: none !important;
  }

  .dy-links li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: transparent !important;
  }

  #dy-beacon a,
  #dy-side a,
  #dy-foot a {
    text-decoration: none !important;
  }

  .dy-nav a,
  .dy-links a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 4px 10px !important;
    color: #d7e7f7 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    background: rgba(8, 14, 24, 0.35) !important;
    border: 1px solid rgba(125, 211, 252, 0.22) !important;
    border-radius: 999px !important;
  }

  .dy-links a {
    width: 100%;
    border-radius: 12px !important;
  }

  .dy-nav a:hover,
  .dy-links a:hover,
  .dy-brand:hover .dy-brand__text strong {
    color: #ffffff !important;
    border-color: rgba(125, 211, 252, 0.7) !important;
    background: rgba(59, 130, 246, 0.2) !important;
  }

  .dy-go {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px !important;
    color: #081018 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap;
    background: linear-gradient(180deg, #d9f4ff 0%, #7dd3fc 100%) !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.4), 0 8px 20px rgba(56, 189, 248, 0.25) !important;
  }

  .dy-go--block {
    display: flex !important;
    width: 100%;
    margin-top: 4px !important;
  }

  .dy-go:hover {
    color: #041018 !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
  }

  #dy-foot .dy-desc a {
    color: #7dd3fc !important;
    border-bottom: 1px solid rgba(125, 211, 252, 0.45);
  }

  .dy-live {
    display: none !important;
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(125, 211, 252, 0.16) !important;
  }

  .dy-live.is-ready {
    display: block !important;
  }

  .dy-status {
    display: none !important;
    padding: 1px 6px;
    color: #d8fff4 !important;
    letter-spacing: 0.08em !important;
    background: rgba(16, 185, 129, 0.18);
    border-radius: 999px;
  }

  .dy-status.is-ready {
    display: inline-flex !important;
  }

  .dy-live ol {
    display: grid !important;
    gap: 8px;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .dy-live li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .dy-live a {
    display: flex !important;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
    width: 100%;
    padding: 8px 10px !important;
    color: #e8eef7 !important;
    background: rgba(5, 10, 18, 0.35) !important;
    border: 1px solid rgba(125, 211, 252, 0.14) !important;
    border-radius: 12px !important;
  }

  .dy-live a:hover {
    border-color: rgba(125, 211, 252, 0.5) !important;
    background: rgba(59, 130, 246, 0.16) !important;
  }

  .dy-feed__title {
    max-height: 2.7em;
    overflow: hidden;
    color: #f4f8fc !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    word-break: break-word;
  }

  .dy-live time {
    color: #e7c27a !important;
    font-family: "SFMono-Regular", "SF Mono", ui-monospace, monospace !important;
    font-size: 11px !important;
  }

  #dy-beacon a:focus-visible,
  #dy-side a:focus-visible,
  #dy-foot a:focus-visible {
    outline: 2px solid #7dd3fc !important;
    outline-offset: 3px;
  }
}

@supports ((display: grid) and (background: conic-gradient(#000, #fff)) and ((mask: radial-gradient(circle, transparent 60%, #000 62%)) or (-webkit-mask: radial-gradient(circle, transparent 60%, #000 62%)))) {
  .dy-mark::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: conic-gradient(from 90deg, transparent 0 68%, #7dd3fc 84%, #e7c27a 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.6px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.6px));
    animation: dy-spin 7s linear infinite;
  }
}

@supports ((display: grid) and (background: linear-gradient(transparent, #000))) {
  .dy-scan {
    display: block;
    position: absolute;
    z-index: 0;
    left: 0;
    right: 0;
    top: -40%;
    height: 38%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(125, 211, 252, 0.14), transparent);
    animation: dy-scan 7.5s linear infinite;
  }
}

@media (max-width: 860px) {
  #dy-beacon {
    align-items: stretch !important;
  }

  #dy-beacon .dy-nav {
    display: none !important;
  }

  #dy-beacon .dy-go {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dy-mark::before,
  .dy-route__line::after,
  .dy-scan,
  .dy-go {
    animation: none !important;
    transform: none !important;
  }

  .dy-scan {
    display: none !important;
  }

  .dy-route__line::after {
    left: calc(100% - 8px);
  }
}

@media print {
  #dy-beacon,
  #dy-side,
  #dy-foot {
    display: none !important;
  }
}

@keyframes dy-spin {
  to { transform: rotate(360deg); }
}

@keyframes dy-run {
  to { left: calc(100% - 8px); }
}

@keyframes dy-scan {
  from { transform: translateY(0); }
  to { transform: translateY(380%); }
}
