* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #000000;
  color: #ffffff;
  width: 100%;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
}
main {
  width: 100%;
  max-width: 700px;
  height: 100svh;
  background: url("./images/1x/BG.png") center bottom / cover no-repeat;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
}
img {
  display: block;
  width: 100%;
  object-fit: contain;
  margin: 0;
  padding: 0;
}
#content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
#header {
  position: absolute;
  top: 0;
  z-index: 2;
}
#box {
  position: absolute;
  width: min(90vw, 520px);
  max-width: calc(100% - 48px);
  height: clamp(430px, 73svh, 620px);
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(138, 205, 244, 0.72);
  border-radius: 0 0 28px 28px;
}
#product-list {
  position: absolute;
  top: clamp(100px, 18svh, 155px);
  left: 6%;
  right: 6%;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 5vw, 20px);
}
.product-box {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
}
.product-box img:first-child {
  flex: 0 0 22%;
  width: 22%;
  position: relative;
  z-index: 2;
}
.product-box img:last-child {
  flex: 1;
  width: auto;
  min-width: 0;
  margin-left: clamp(-10px, -2.5vw, -8px);
}
#img-footer {
  position: absolute;
  z-index: 3;
  width: 100%;
  max-width: clamp(230px, 77vw, 330px);
  bottom: 0;
}
#debug-panel {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 99;
  max-width: calc(100vw - 16px);
  padding: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #00ff90;
  font: 12px/1.35 monospace;
  white-space: pre-wrap;
  pointer-events: none;
}

@media (min-width: 390px) and (min-height: 821px) {
  #product-list {
    left: 4%;
    right: 4%;
  }
}

@media (min-width: 700px) and (orientation: portrait) {
  #box {
    width: min(76vw, 620px);
    height: min(68svh, 720px);
  }

  #product-list {
    gap: 18px;
  }
}

@media (orientation: landscape) and (max-height: 900px) {
  main {
    max-width: 560px;
  }

  #box {
    width: min(86vw, 430px);
    height: clamp(390px, 66svh, 500px);
  }

  #product-list {
    top: clamp(92px, 16svh, 120px);
    left: 6%;
    right: 6%;
    gap: 16px;
  }

  #img-footer {
    max-width: 280px;
  }
}

@media (min-width: 1200px) and (orientation: landscape) and (max-height: 900px) {
  main {
    max-width: 640px;
  }

  #box {
    width: min(86vw, 500px);
    height: clamp(520px, 68svh, 580px);
  }

  #product-list {
    top: clamp(136px, 16svh, 145px);
    gap: 14px;
  }

  #img-footer {
    max-width: 310px;
  }
}
