.window.win-bilibili { border-color:#ce84a2; }
.window.win-bilibili.active { border-color:#b94478; }
.win-bilibili > .titlebar { background:linear-gradient(#ffdce9,#de9ab6 16%,#c17c9a 88%,#a86080); text-shadow:0 1px 2px #753d58; }
.win-bilibili.active > .titlebar { background:linear-gradient(#ffe0ee,#fc9cc3 8%,#da548e 28%,#c63e7b 80%,#a42f63); }
.win-bilibili .winbody { overflow: hidden; background: #fff6fa; color: #412739; }
.bv-home { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.bv-feed-actions { display: flex; gap: 6px; }
.bv-feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 0; }
.bv-feed-heading h2 { margin: 0; font-size: 14px; color: #703651; }
.bv-scroll { overflow: hidden auto; overscroll-behavior: none contain; scrollbar-width: none; }
.bv-scroll { flex: 1; padding: 8px 12px; }
.bv-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 144px), 1fr));
  gap: 10px; list-style: none; padding: 0; margin: 0;
}
.bv-list li { min-width: 0; }
.bv-video {
  display: grid; grid-template-rows: auto 1fr; width: 100%; height: 100%;
  padding: 0; overflow: hidden; text-align: left;
  background: #fff; border: 1px solid #e4bbcd; border-radius: 3px; color: #422637;
}
.bv-video:focus-visible, .bv-video:hover { background: #ffecf4; }
.bv-video-cover { display: block; width: 100%; aspect-ratio: 16/9; background: #f1dbe5; }
.bv-video-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bv-video-copy { display: grid; align-content: start; gap: 4px; padding: 7px 8px; overflow-wrap: anywhere; }
.bv-video-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.35; }
.bv-video-copy small, .bv-notice { color: #705365; }
.bv-notice { margin: 8px 12px; }
.bv-notice:empty { display: none; }
.bv-detail[open] {
  position: fixed; inset: 0; margin: 0; padding: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; border: 0; overflow: hidden; background: #000; color: #fff;
}
.bv-detail::backdrop { background: #000; }
.bv-player {
  position: absolute;
  inset: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  display: block;
  border: 0;
  width: calc(100% - var(--safe-left) - var(--safe-right));
  height: calc(100% - var(--safe-top) - var(--safe-bottom));
  background: #000;
}
.bv-player-bar {
  position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: max(6px,var(--safe-top)) max(12px,var(--safe-right)) 10px max(8px,var(--safe-left));
  background: linear-gradient(#000d, #0008 70%, transparent);
}
.bv-player-bar h2 { flex: 1; min-width: 0; font-size: 14px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-play-button {
  min-height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid #ffffff55;
  border-radius: 7px; color: white; background: #171316c9; font: 600 14px system-ui; cursor: pointer;
}
.bv-play-button:focus-visible { outline: 2px solid #ffafcb; outline-offset: 2px; }
.bv-back { font-size: 22px; }
.bv-favorite[aria-pressed=true] { color: #ffc1da; }
.bv-reveal {
  position: absolute; top: max(6px,var(--safe-top)); left: max(8px,var(--safe-left));
  background: #1410148c; border-color: transparent; color: #fff; font-size: 20px;
}
.bv-player-status { position: absolute; top: calc(var(--safe-top) + 60px); left: max(12px,var(--safe-left)); padding: 5px 8px; background: #000b; border-radius: 4px; }
.bv-player-status:empty { display: none; }
.bv-paper {
  transform: translateY(var(--bv-pull, 0));
  transition: transform .38s cubic-bezier(.16,1,.3,1);
}
.bv-paper.pulled { transition: none; }
.bv-bottom { padding:12px 0 6px; text-align:center; font-size:12px; color:#8b6274; }
.bv-rift[open] {
  position: fixed; inset: 0; margin: 0; width: 100%; height: 100%;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  max-width: none; max-height: none; border: 0; overflow: hidden; isolation: isolate;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 51% 50%, #26213c 0%, #10121e 35%, #030509 80%);
  color: #191922;
}
.bv-rift::backdrop { background: #030509; }
.bv-rift::before, .bv-rift::after {
  content: ''; position: absolute; pointer-events: none; z-index: -1;
}
.bv-rift::before {
  inset: -15% -10%;
  background: linear-gradient(110deg,#192b62 28%,#889fe0 44%,#e1dbff 50%,#805bb8 55%,#1c0c37 75%);
  clip-path: polygon(61% 0,52% 26%,55% 27%,48% 44%,52% 43%,47% 58%,49% 57%,39% 100%,47% 66%,44% 67%,48% 48%,45% 49%,52% 29%,50% 30%);
  animation: bv-tear .42s ease-out both;
}
.bv-rift::after {
  inset: -30%;
  background: repeating-conic-gradient(from -25deg at 50% 50%,transparent 0deg 22deg,#9eabff22 23deg,transparent 25deg 47deg);
  opacity: 0;
}
.bv-question {
  width: min(320px, 86vw, 100%); box-sizing: border-box; padding: 19px 18px 15px; text-align: center;
  background: #ece9d8; border: 2px solid #6478a2; border-radius: 5px;
  box-shadow: inset 0 0 0 1px #fff, 0 12px 48px #000a;
}
.bv-question p { margin: 0 0 15px; line-height: 1.65; font-size: 16px; }
.bv-choice { display: flex; justify-content: center; gap: 15px; }
.bv-choice button {
  min-width: 76px; min-height: 34px; border-radius: 3px; border: 1px solid #423e49; color: #fff;
  box-shadow: inset 0 1px 0 #ffffff70; font: bold 14px Tahoma,sans-serif; cursor: pointer;
}
.bv-yes { background: linear-gradient(#c9493e,#9a221f); }
.bv-no { background: linear-gradient(#37864e,#205c36); }
.bv-choice button:focus-visible { outline: 2px dotted #24334c; outline-offset: 2px; }
.bv-rift.turbulent .bv-question { animation: bv-collapse .5s ease-in both; }
.bv-rift.turbulent::before { animation: bv-shear 1.5s ease-in both; }
.bv-rift.turbulent::after { animation: bv-vortex 1.5s ease-in both; }
@keyframes bv-tear { from { transform: scaleX(.1); opacity: 0; } to { opacity: 1; } }
@keyframes bv-collapse { to { transform: scale(.7) skewX(-8deg); opacity: 0; } }
@keyframes bv-shear { 45% { transform: skewX(14deg) scale(2); } to { transform: rotate(-24deg) scale(7); opacity: 0; } }
@keyframes bv-vortex { 55% { opacity: .85; } to { transform: rotate(85deg) scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bv-paper { transition-duration: .08s; }
  .bv-rift::before, .bv-rift.turbulent::before, .bv-rift.turbulent::after { animation: none; }
  .bv-rift.turbulent .bv-question { animation: bv-dim .35s ease both; }
  @keyframes bv-dim { to { opacity: 0; } }
}
