#fixed-buttons {
  position: fixed;
  z-index: 90000;
  display: flex;
  flex-direction: column;
  gap: 2.6666666667vw;
  width: 15.4666666667vw;
  top: 2.6666666667vw;
  right: 0;
}

#fixed-buttons button {
  box-sizing: border-box;
  background: #000;
  transform: translateZ(0);
  border: 0.8vw solid #fff;
  filter: drop-shadow(0px 0px 2.6666666667vw rgba(0, 0, 0, 0.3));
}

#fixed-buttons button.search {
  aspect-ratio: 100/80;
  width: 100%;
  border-radius: 8vw 0 0 8vw;
  padding-left: 4.6666666667vw;
  border-right: none;
}

#fixed-buttons button.search img {
  width: 5.7333333333vw;
}

#fixed-buttons button.square {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
}

#fixed-buttons button.square img {
  width: 6.6666666667vw;
}

.result {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  transform: translateZ(0);
  border-radius: 10.6666666667vw;
  filter: drop-shadow(0px 0px 2.6666666667vw rgba(0, 0, 0, 0.3));
  border: 1.0666666667vw solid #fff;
  margin: 5.3333333333vw 0;
}

.result .result-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #ffcf0f;
  gap: 1.3333333333vw;
  padding: 2.6666666667vw 0;
  font-size: 16px;
}

.result .result-title::before {
  content: "";
  background: url(../img/ic_search_b.svg) no-repeat;
  background-size: contain;
  aspect-ratio: 1;
  width: 3.3333333333vw;
}

.result #resultSummary {
  flex: 1;
  font-weight: 400;
  line-height: 1.5;
  font-size: 18px;
}

.contents {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 89.3333333333vw;
  padding-bottom: 13.3333333333vw;
}

#sortAsc.is-current,
#sortDesc.is-current {
  background: #ffcf0f;
  border-color: #fff;
}

#sortAsc.is-current img,
#sortDesc.is-current img {
  transform: translateZ(0);
  filter: invert(1);
}

#noResult {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  transform: translateZ(0);
  border-radius: 10.6666666667vw;
  filter: drop-shadow(0px 0px 2.6666666667vw rgba(0, 0, 0, 0.3));
  border: 1.0666666667vw solid #fff;
  line-height: 1.5;
  padding: 1.3333333333vw 6.6666666667vw;
  text-align: center;
  font-size: 18px;
}

#list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6666666667vw;
}

#list li {
  background: #f6f6f6;
  overflow: hidden;
  border-radius: 2.6666666667vw;
  transform: translateZ(0);
  filter: drop-shadow(0px 0px 2.6666666667vw rgba(0, 0, 0, 0.3));
}

#list a {
  position: relative;
  display: flex;
  flex-direction: column;
}

#list p.name {
  color: #000;
  line-height: 1.5;
  padding: 1.6vw 2.1333333333vw;
  font-size: 13px;
}

#list .thumb {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
}

#list .thumb:has(:not(.js-lazy)) {
  background: #fff;
}

#list .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

#list .thumb img.js-lazy {
  opacity: 0;
}

#list .thumb img:not(.js-lazy) {
  opacity: 1;
}

#list .loader {
  position: absolute;
  aspect-ratio: 1;
  width: 100%;
}

#list .loader::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ccc;
  --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--_m);
  mask: var(--_m);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  animation: loader 1s infinite linear;
  width: 5.3333333333vw;
  padding: 1.0666666667vw;
}

@keyframes loader {
  to {
    transform: translate(-50%, -50%) rotate(1turn);
  }
}

#bg {
  width: 100vw;
  height: 100vh;
  position: fixed;
  inset: 0;
  display: grid;
  background: url(../img/bg_tile.png) repeat;
  background-size: 320px auto;
}

.cell {
  aspect-ratio: 1;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-word;
}

.cell.image {
  opacity: 0.3;
  background: #fff;
}

.cell.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, opacity 0.6s ease;
  transform-origin: center center;
}

.cell.image.is-out img {
  transform: scale(0) rotate(180deg);
  opacity: 0;
}

.cell.image.is-in img {
  transform: scale(1) rotate(360deg);
  opacity: 1;
}

@media print, screen and (min-width: 768px) {
  #fixed-buttons {
    gap: min(20px,  calc(20 / 1366 * 100vw));
    width: min(100px,  calc(100 / 1366 * 100vw));
    top: min(80px,  calc(80 / 1366 * 100vw));
  }

  #fixed-buttons button {
    filter: drop-shadow(0px 0px min(8px,  calc(8 / 1366 * 100vw)) rgba(0, 0, 0, 0.3));
    border-width: min(3px,  calc(3 / 1366 * 100vw));
    transition: opacity 0.3s;
  }

  #fixed-buttons button.search {
    border-radius: min(40px,  calc(40 / 1366 * 100vw)) 0 0 min(40px,  calc(40 / 1366 * 100vw));
    padding-left: min(30px,  calc(30 / 1366 * 100vw));
  }

  #fixed-buttons button.search img {
    width: min(35px,  calc(35 / 1366 * 100vw));
  }

  #fixed-buttons button.square {
    width: min(60px,  calc(60 / 1366 * 100vw));
    border-radius: min(10px,  calc(10 / 1366 * 100vw));
    margin-left: min(20px,  calc(20 / 1366 * 100vw));
  }

  #fixed-buttons button.square img {
    width: min(36px,  calc(36 / 1366 * 100vw));
  }

  .result {
    flex-direction: row;
    border-radius: min(40px,  calc(40 / 1366 * 100vw));
    filter: drop-shadow(0px 0px min(8px,  calc(8 / 1366 * 100vw)) rgba(0, 0, 0, 0.3));
    border-width: min(6px,  calc(6 / 1366 * 100vw));
    margin: min(20px,  calc(20 / 1366 * 100vw)) 0;
  }

  .result .result-title {
    gap: min(8px,  calc(8 / 1366 * 100vw));
    width: min(180px,  calc(180 / 1366 * 100vw));
    padding: min(12px,  calc(12 / 1366 * 100vw)) 0;
  }

  .result .result-title::before {
    width: min(21px,  calc(21 / 1366 * 100vw));
  }

  .result #resultSummary {
    padding: min(10px,  calc(10 / 1366 * 100vw)) min(20px,  calc(20 / 1366 * 100vw));
  }

  .contents {
    width: min(1080px,  calc(1080 / 1366 * 100vw));
    padding-bottom: min(70px,  calc(70 / 1366 * 100vw));
  }

  #noResult {
    flex-direction: row;
    border-radius: min(40px,  calc(40 / 1366 * 100vw));
    filter: drop-shadow(0px 0px min(8px,  calc(8 / 1366 * 100vw)) rgba(0, 0, 0, 0.3));
    border-width: min(6px,  calc(6 / 1366 * 100vw));
    padding: min(10px,  calc(10 / 1366 * 100vw)) min(20px,  calc(20 / 1366 * 100vw));
    text-align: left;
  }

  #list {
    grid-template-columns: repeat(5, 1fr);
    gap: min(20px,  calc(20 / 1366 * 100vw));
  }

  #list li {
    filter: drop-shadow(0px 0px min(8px,  calc(8 / 1366 * 100vw)) rgba(0, 0, 0, 0.3));
    border-radius: min(10px,  calc(10 / 1366 * 100vw));
  }

  #list a {
    transition: opacity 0.3s;
  }

  #list p.name {
    padding: min(12px,  calc(12 / 1366 * 100vw)) min(16px,  calc(16 / 1366 * 100vw));
  }

  #list .loader::before {
    width: min(30px,  calc(30 / 1366 * 100vw));
    padding: min(8px,  calc(8 / 1366 * 100vw));
  }

  #bg {
    background-size: 640px auto;
  }

  .cell {
    width: 160px;
  }
}

@media print and (hover: hover), screen and (min-width: 768px) and (hover: hover) {
  #fixed-buttons button:hover {
    opacity: 0.6;
  }

  #list a:hover {
    opacity: 0.6;
  }
}

@media screen and (min-width: 768px) and (-ms-high-contrast: active), screen and (min-width: 768px) and (-ms-high-contrast: none) {
  #fixed-buttons button:hover {
    opacity: 0.6;
  }

  #list a:hover {
    opacity: 0.6;
  }
}

@media only screen and (max-width: 767.8px) {
  #fixed-buttons button.square {
    width: 10.6666666667vw;
    border-right: none;
    border-radius: 2.6666666667vw 0 0 2.6666666667vw;
    margin-left: 4.8vw;
  }

  .result .result-title {
    font-size: 3.2rem;
  }

  .result #resultSummary {
    font-size: 3.6rem;
  }

  .result #resultSummary {
    text-align: center;
    padding: 1.3333333333vw 6.6666666667vw;
  }

  #noResult {
    font-size: 3.6rem;
  }

  #list p.name {
    font-size: 2rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 1365.8px) {
  .result .result-title {
    font-size: 1.6rem;
  }

  .result #resultSummary {
    font-size: 1.8rem;
  }

  #noResult {
    font-size: 1.8rem;
  }

  #list p.name {
    font-size: 1.3rem;
  }
}