* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  text-align: center;
  font-weight: 700;
  font-family: "MS Sans Serif", Tahoma, Geneva, Verdana, sans-serif;
  color: #111;
  background: #1a1a1a url("images/background.jpg") center center / cover no-repeat fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

h1 {
  font-weight: 700;
  background: #b8ff9f;
  display: table;
  margin: 30px auto 0;
  padding: 15px 30px;
  border: 5px solid #c1faad;
  box-shadow: inset 1px 1px 0 0 #92c77f;
  font-size: 25px;
  line-height: 1.25;
}

h1 span {
  display: block;
}

h1 span.sub {
  color: #cd6180;
  font-size: 18px;
  margin-top: 2px;
}

h1 span.hint {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.2;
  color: #5eb7e6;
  text-shadow: 0 2px #fff;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-weight: 700;
}

.pat-count {
  background: #b1a1f6;
  font-family: sans-serif;
  display: inline-block;
  padding: 5px 0;
  font-size: 23px;
  color: #f7e15f;
  margin-top: 20px;
  border: 5px solid #c4b3f8;
  box-shadow: inset 1px 1px 0 0 #9d90c5;
  width: 480px;
  max-width: calc(100% - 24px);
}

.pat-count.pop span {
  display: inline-block;
  animation: bump 0.28s ease;
}

.pet-frame {
  position: relative;
  height: 400px;
  width: 480px;
  max-width: calc(100% - 24px);
  margin: -4px auto 0;
  overflow: hidden;
  border: 5px solid #c4b3f8;
  box-shadow: inset 1px 1px 0 0 #9d90c5;
  background: #efe8ff;
  cursor: none;
  touch-action: none;
  user-select: none;
}

.pet-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  pointer-events: none;
  transform-origin: 50% 70%;
  will-change: transform;
}

.paw {
  position: absolute;
  width: 92px;
  height: 92px;
  margin-left: -20px;
  margin-top: -28px;
  pointer-events: none;
  filter: drop-shadow(2px 4px 0 rgba(90, 60, 40, 0.25));
  z-index: 2;
}

.paw svg {
  width: 100%;
  height: 100%;
  transform: rotate(-18deg);
}

.plus {
  position: absolute;
  left: 50%;
  top: 18%;
  font-size: 42px;
  color: #fff7a8;
  text-shadow: 2px 3px #836e1f;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

.plus.show {
  animation: floatup 0.7s ease forwards;
}

.btn-box {
  display: table;
  background: #d0fff7;
  border: 5px solid #d9f7ef;
  box-shadow: inset 1px 1px 0 0 #c7e8e1;
  margin: 25px auto 0;
  max-width: calc(100% - 24px);
}

.love {
  background: #d0fff7;
  font-family: "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 42px;
  color: #f9d445;
  text-shadow: 2px 4px #836e1f;
}

.love-space {
  padding: 12px 28px;
  white-space: nowrap;
}

.address {
  margin: 18px auto 0;
  max-width: min(640px, calc(100% - 24px));
  padding: 10px 14px;
  background: #fff7b0;
  border: 5px solid #ffe98a;
  box-shadow: inset 1px 1px 0 0 #e6cc62;
  font-size: 16px;
  line-height: 1.35;
  word-break: break-all;
}

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes floatup {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1.15); }
}

@media (max-width: 560px) {
  h1 {
    font-size: 20px;
    padding: 12px 12px;
    margin-top: 16px;
  }

  h1 span.hint {
    font-size: 13px;
  }

  .pet-frame {
    height: 320px;
  }

  .love {
    font-size: 28px;
  }

  .love-space {
    padding: 10px 16px;
  }

  .pat-count {
    font-size: 18px;
  }

  .address {
    font-size: 13px;
  }
}
