* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #505050;
  background-image: url("img/back_marble.png");
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 640px auto;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #222;
}

.site-header {
  --emblem-size: clamp(44px, 13vw, 112px);
  --emblem-gap: clamp(6px, 2.4vw, 16px);
  --header-pad-x: clamp(10px, 3.2vw, 32px);
  --logo-width: clamp(120px, 37vw, 384px);
  --nav-font-size: clamp(9px, 2.6vw, 18px);
  --nav-gap: clamp(8px, 4.8vw, 58px);
  --nav-shift: clamp(5px, 2.4vw, 35px);

  position: sticky;
  top: 0;
  width: 100%;
  padding: 16px var(--header-pad-x) 8px var(--header-pad-x);
  background-color: rgba(232, 232, 232, 0.3);
  border: 2px solid #999999;
  z-index: 1000;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

.header-emblem {
  position: absolute;
  top: 50%;
  left: calc(var(--header-pad-x) * 0.4);
  transform: translateY(-50%);
  width: var(--emblem-size);
  height: var(--emblem-size);
  object-fit: contain;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: calc(var(--emblem-size) + var(--emblem-gap));
  min-width: 0;
}

.header-logo {
  width: var(--logo-width);
  max-width: 100%;
  height: auto;
  display: block;
}

.header-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--nav-gap);
  margin-top: 5px;
  margin-left: var(--nav-shift);
}

.header-nav a {
  cursor: pointer;
  text-decoration: underline;
  color: #66ccff;
  font-weight: bold;
  font-style: italic;
  font-size: var(--nav-font-size);
  white-space: nowrap;
  -webkit-text-stroke: 1.5px #000000;
  paint-order: stroke fill;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s;
}

.header-nav a:hover {
  opacity: 0.6;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px 20px 60px 20px;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
}

.main-btn-wrap {
  position: relative;
  width: min(600px, 90vw);
}

.main-btn {
  width: 100%;
  height: auto;
  display: block;
}

.main-btn-push {
  position: absolute;
  right: -6%;
  bottom: 0;
  width: 22%;
  height: auto;
  transform: translate(-15%, -15%);
  pointer-events: none;
  transition: filter 0.15s;
}

.main-btn-push.spin-to-look:hover {
  filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

@keyframes push-icon-to-look {
  from {
    transform: translate(-15%, -15%) rotate(0deg);
  }
  to {
    transform: translate(-15%, -15%) rotate(-90deg);
  }
}

@keyframes push-icon-to-push {
  from {
    transform: translate(-15%, -15%) rotate(-90deg);
  }
  to {
    transform: translate(-15%, -15%) rotate(0deg);
  }
}

.main-btn-push.spin-to-look {
  animation: push-icon-to-look 0.25s ease both;
  pointer-events: auto;
  cursor: pointer;
}

.main-btn-push.spin-to-push {
  animation: push-icon-to-push 0.25s ease both;
  pointer-events: none;
}

.piece {
  position: absolute;
}

.piece-img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  transition: filter 0.15s;
}

.piece-hit {
  position: absolute;
  inset: 20%;
  display: block;
  cursor: pointer;
}

.piece-hit:hover + .piece-img {
  filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

.piece-hit:active + .piece-img {
  filter: brightness(0.5);
}

.piece.is-open .piece-img {
  filter: brightness(0.5) !important;
}

.piece-a {
  left: 43.54%;
  top: 44.54%;
  width: 12.91%;
  height: 12.91%;
}

.piece-m {
  left: 24.32%;
  top: 11.41%;
  width: 18.62%;
  height: 18.42%;
}

.piece-t {
  left: 40.04%;
  top: 23.42%;
  width: 19.92%;
  height: 16.92%;
}

.piece-j {
  left: 24.42%;
  top: 32.63%;
  width: 17.22%;
  height: 16.12%;
}

.piece-u {
  left: 58.36%;
  top: 32.73%;
  width: 16.62%;
  height: 15.52%;
}

.piece-g {
  left: 24.32%;
  top: 51.15%;
  width: 15.92%;
  height: 17.32%;
}

.piece-r {
  left: 58.36%;
  top: 51.15%;
  width: 17.32%;
  height: 17.32%;
}

.piece-s {
  left: 40.14%;
  top: 59.36%;
  width: 19.72%;
  height: 20.52%;
}

.piece-l {
  left: 57.56%;
  top: 70.37%;
  width: 18.12%;
  height: 18.22%;
}

.info-box {
  width: min(600px, 90vw);
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  border-radius: 8px;
  transition: max-height 0.5s ease, margin-top 0.5s ease;
}

.info-box.open {
  max-height: 600px;
  margin-top: -15px;
}

.info-box-inner {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background-color: rgba(232, 232, 232, 0.3);
  border: 2px solid #999999;
  border-radius: 8px;
}

@keyframes info-box-icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes info-box-icon-spin-r {
  from {
    transform: rotate(-30deg);
  }
  to {
    transform: rotate(330deg);
  }
}

@keyframes info-box-icon-spin-g {
  from {
    transform: rotate(30deg);
  }
  to {
    transform: rotate(390deg);
  }
}

@keyframes info-box-icon-spin-j {
  from {
    transform: rotate(60deg);
  }
  to {
    transform: rotate(420deg);
  }
}

@keyframes info-box-icon-spin-l {
  from {
    transform: rotate(30deg);
  }
  to {
    transform: rotate(390deg);
  }
}

@keyframes info-box-icon-spin-m {
  from {
    transform: rotate(30deg);
  }
  to {
    transform: rotate(390deg);
  }
}

@keyframes info-box-icon-spin-u {
  from {
    transform: rotate(-60deg);
  }
  to {
    transform: rotate(300deg);
  }
}

.info-box.open .info-box-icon {
  animation: info-box-icon-spin 0.6s ease;
}

#info-box-r.info-box.open .info-box-icon {
  animation: info-box-icon-spin-r 0.6s ease;
}

#info-box-g.info-box.open .info-box-icon {
  animation: info-box-icon-spin-g 0.6s ease;
}

#info-box-j.info-box.open .info-box-icon {
  animation: info-box-icon-spin-j 0.6s ease;
}

#info-box-l.info-box.open .info-box-icon {
  animation: info-box-icon-spin-l 0.6s ease;
}

#info-box-m.info-box.open .info-box-icon {
  animation: info-box-icon-spin-m 0.6s ease;
}

#info-box-u.info-box.open .info-box-icon {
  animation: info-box-icon-spin-u 0.6s ease;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 0;
}

.info-box-icon {
  width: 18%;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(5px 5px 7px rgba(0, 0, 0, 0.9));
}

#info-box-r .info-box-icon {
  transform: rotate(-30deg);
}

#info-box-g .info-box-icon {
  transform: rotate(30deg);
}

#info-box-j .info-box-icon {
  transform: rotate(60deg);
}

#info-box-l .info-box-icon {
  transform: rotate(30deg);
}

#info-box-m .info-box-icon {
  transform: rotate(30deg);
}

#info-box-u .info-box-icon {
  transform: rotate(-60deg);
}

.info-box-title {
  margin: 0;
  margin-left: 1em;
  font-size: clamp(36px, 8vw, 60px);
  font-weight: bold;
  font-style: italic;
  color: var(--title-color, #a64dff);
  -webkit-text-stroke: 2px #000000;
  paint-order: stroke fill;
  text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.6);
}

.info-box-title rt {
  font-size: 0.35em;
  font-weight: bold;
  font-style: normal;
  color: var(--title-color, #a64dff);
  -webkit-text-stroke: 1px #000000;
  paint-order: stroke fill;
}

.info-box-title-img {
  height: 1em;
  width: auto;
  vertical-align: middle;
}

#info-box-a .info-box-title {
  margin-left: 0.1em;
  font-size: clamp(46px, 10vw, 75px);
  flex: 1 1 auto;
  min-width: 0;
}

#info-box-a .info-box-title-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
}

#info-box-a .info-box-title rt {
  color: #7fffd4;
}

.info-box-desc {
  margin: 4px 0 0 0;
  text-align: center;
  color: #333;
  font-size: clamp(1px, 3.6vw, 24px);
  font-weight: bold;
  line-height: 1.6;
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.info-box:not(#info-box-a) .info-box-desc {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

.info-box-code {
  color: var(--title-color, #a64dff);
  -webkit-text-stroke: 1px #000000;
  paint-order: stroke fill;
}

.info-box-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  row-gap: 12px;
  column-gap: 24px;
}

#info-box-r .info-box-links {
  margin-top: 8px;
}

.info-box-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.info-box-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.info-box-link:hover {
  opacity: 0.7;
}

.info-box-link img {
  width: clamp(36px, 9vw, 64px);
  height: clamp(36px, 9vw, 64px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.7));
}

.info-box-link-banner img {
  width: auto;
  height: clamp(36px, 9vw, 64px);
}

.news-box {
  width: min(600px, 90vw);
  margin-top: 20px;
}

.news-box-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1.3 / 1;
  background-color: rgba(232, 232, 232, 0.3);
  border: 2px solid #999999;
  border-radius: 8px;
}

.news-box-title {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: clamp(18px, 4vw, 30px);
  font-weight: bold;
  color: #333;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
