.ohnice-home-video {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(164px + env(safe-area-inset-bottom));
  width: 118px;
  z-index: 9998;
  font-family: var(--ohnice-body-font, Georgia, serif);
  font-style: normal;
  letter-spacing: 0;
}
.ohnice-home-video[hidden], .ohnice-home-video [hidden], .ohnice-home-video-dialog [hidden] { display: none !important; }
.ohnice-home-video__open {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 464 / 848;
  border-radius: 14px;
  background: #30221c;
  color: #fff;
  box-shadow: 0 8px 28px rgb(40 18 12 / 24%);
  text-decoration: none;
}
.ohnice-home-video__open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ohnice-home-video__play {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: #bf101c;
  transition: background-color .18s ease-out;
}
.ohnice-home-video__open:hover .ohnice-home-video__play { background: #96101a; }
.ohnice-home-video__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 9px 8px 10px;
  background: rgb(26 14 10 / 92%);
  color: #fff;
  font: 700 16px/1.2 var(--ohnice-body-font, Georgia, serif);
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
}
.ohnice-home-video__caption span { display: block; margin-top: 3px; color: #f2dfd2; font-size: 13px; font-weight: 400; }
.ohnice-home-video__hide {
  position: absolute;
  top: -16px;
  right: -10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #30221c;
  color: #fff;
  cursor: pointer;
}
.ohnice-home-video :focus-visible, .ohnice-home-video-dialog :focus-visible { outline: 3px solid #1269a6; outline-offset: 3px; }
.ohnice-home-video-dialog {
  padding: 12px;
  border: 0;
  border-radius: 14px;
  margin: auto;
  width: min(400px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100svh - 24px);
  overflow: auto;
  background: #fae9d9;
  color: #201915;
  box-sizing: border-box;
  scrollbar-color: #a4463d #fae9d9;
}
.ohnice-home-video-dialog::backdrop { background: rgb(16 10 8 / 80%); }
.ohnice-home-video-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ohnice-home-video-dialog__header h2 { margin: 0; color: #201915; font: 700 24px/1.1 var(--ohnice-display-font, Georgia, serif); text-transform: none; letter-spacing: 0; }
.ohnice-home-video-dialog__header button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #eed4c0;
  color: #201915;
  cursor: pointer;
}
.ohnice-home-video-dialog video { display: block; width: 100%; height: min(70svh, 640px); object-fit: contain; background: #100c0a; border-radius: 4px; }
.ohnice-home-video-dialog__fallback { display: inline-block; padding: 10px 0 2px; color: #8d1019; font: 16px/1.25 var(--ohnice-body-font, Georgia, serif); text-decoration: underline; text-underline-offset: 3px; letter-spacing: 0; }
.ohnice-home-video-dialog__status { margin: 10px 0 0; color: #201915; font: 16px/1.4 var(--ohnice-body-font, Georgia, serif); letter-spacing: 0; }
.ohnice-home-video-dialog ::selection { background: #bf101c; color: #fff; }
@media (max-width: 767px) {
  .ohnice-home-video { width: 92px; left: max(16px, env(safe-area-inset-left)); right: auto; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .ohnice-home-video__caption { font-size: 14px; padding: 7px 5px 8px; }
  .ohnice-home-video__caption span { font-size: 12px; }
  .ohnice-home-video__hide { right: -8px; }
}
@media (max-height: 460px) { .ohnice-home-video { width: 76px; } .ohnice-home-video-dialog video { height: 52svh; } }
@media (prefers-reduced-motion: reduce) { .ohnice-home-video__play { transition: none; } }
@media print { .ohnice-home-video, .ohnice-home-video-dialog { display: none !important; } }
