@charset "UTF-8";

:root {
  --r-box-height: 153px;
}

* {
  margin: 0;
  padding: 0;
  border: none;
  box-sizing: border-box;
}

template {
  display: none;
}

#container {
  display: flex;
  flex-direction: row;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

main {
  flex-grow: 1;
}

main > #app {
  width: 100%;
  height: 100%;
}

#ad-looking {
  display: none;
}

@media (min-width: 1024px) {
  #ad-looking {
    display: flex;
    flex-direction: column;
    /* right align */
    align-items: flex-end;
    width: 300px;
    background-color: rgb(60, 0, 90);
  }
}

#ad-looking > div {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

#youtube-container {
  flex-grow: 1;
  height: 0;
  display: flex;
  flex-direction: column;
  /* right align */
  align-items: flex-end;
}

#wp-container,
#qiita-container {
  display: none;
}

@media (min-height: 310px) {
  #wp-container {
    display: block;
    height: var(--r-box-height);
  }
}

@media (min-height: 450px) {
  #qiita-container {
    display: block;
    height: var(--r-box-height);
  }
}

@media (min-height: 700px) {
  #wp-container {
    height: calc(2 * var(--r-box-height));
  }
}

@media (min-height: 900px) {
  #qiita-container {
    height: calc(2 * var(--r-box-height));
  }
}

@media (min-height: 1800px) {
  #wp-container,
  #qiita-container {
    height: initial;
  }
}

a.wp-link,
a.qiita-link {
  position: relative;
}

:where(.wp-link, .qiita-link) img {
  object-fit: cover;
  display: block;
}

.wp-title,
.qiita-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 272px;
  padding: 0.25rem;
  background-color: rgba(60, 0, 90, 0.7);
  color: white;
  font-size: 0.875rem;
  height: 3rem;
  max-height: 3rem;
  overflow: hidden;
  /* -webkit-line-clamp requires -webkit-box-orient and display:-webkit-box */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
}
