:root {
  font-family: "MS PGothic", "Osaka", "Hiragino Kaku Gothic ProN", sans-serif;
  color: #000080;
  background: #fff;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: #fff;
  background-image:
    radial-gradient(#d8d8ff 0.8px, transparent 0.8px),
    radial-gradient(#ffd6e7 0.8px, #fff 0.8px);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

main {
  width: min(720px, calc(100% - 24px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 42px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}

marquee { max-width: 100%; }

.welcome {
  margin: 0 0 16px;
  color: #f00;
  font-weight: bold;
}

h1 {
  margin: 0;
  color: #f0f;
  font-family: serif;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: .08em;
  text-shadow: 2px 2px 0 #ff0;
  white-space: nowrap;
}

.subtitle { color: #008000; }

.face {
  display: block;
  width: min(440px, 92%);
  height: auto;
  margin: 22px auto;
  border: 6px ridge #c0c0c0;
}

img { max-width: 100%; }

.hello table {
  max-width: 100%;
  margin-inline: auto;
}

.hello td { max-width: 100%; }

.hello img { height: auto; }

hr {
  height: 8px;
  margin: 28px 0;
  border: 0;
  background: repeating-linear-gradient(90deg, #00f 0 14px, #f0f 14px 28px, #0cc 28px 42px);
}

.counter-label {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 9px;
  color: #d00070;
  background: #fff0f7;
  border: 1px dashed #ff69b4;
  font-family: serif;
  font-size: .72rem;
}

.counter {
  display: inline-flex;
  width: min(100%, 702px);
  max-width: 100%;
  margin: 6px 0 4px;
  padding: 4px 6px;
  background: #fffdf8;
  border: 4px ridge #d6a0b4;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f1dce4;
  justify-content: center;
  overflow: hidden;
  vertical-align: middle;
}

.counter img {
  display: block;
  width: calc(100% / 39);
  min-width: 0;
  max-width: 18px;
  height: auto;
  flex: 1 1 0;
}

section {
  margin: 26px auto;
  padding: 14px;
  border: 3px double #008000;
  background: #ffffe0;
}

h2 {
  margin-top: 0;
  color: #008000;
  font-size: 1.15rem;
}

.retro-contents {
  border-color: #f06;
  background: #fff0f7;
}

.retro-contents h2 { color: #c0006f; }

.retro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.retro-card {
  min-width: 0;
  padding: 10px 6px;
  color: #000080;
  background: #fff;
  border: 3px outset #ffc0dc;
}

.retro-card h3 {
  margin: 0 0 8px;
  color: #c0006f;
  font-size: .95rem;
}

.retro-link-card {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: underline;
}

.retro-link-card:hover {
  background: #ffffc0;
}

.retro-card-title {
  color: #c0006f;
  font-weight: bold;
}

.retro-card p { margin: 6px 0; }

.construction-sign {
  display: inline-block;
  padding: 3px 14px;
  color: #000;
  background: repeating-linear-gradient(
    135deg,
    #ff0 0 10px,
    #000 10px 20px
  );
  border: 3px ridge #f00;
  font-weight: bold;
  text-shadow: -1px -1px 0 #ff0, 1px 1px 0 #ff0;
  animation: construction-flash .8s steps(1, end) infinite;
}

.new-sign {
  display: inline-block;
  padding: 3px 14px;
  color: #f00;
  background: #ff0;
  border: 3px outset #f0f;
  font-weight: bold;
  animation: blink 1s steps(1, end) infinite;
}

.bbs-open-sign {
  display: inline-block;
  padding: 4px 12px;
  color: #fff;
  background: #000080;
  border: 3px outset #0ff;
  box-shadow: 3px 3px 0 #f0f;
  font-family: "Arial Black", sans-serif;
  font-size: .78rem;
  font-weight: bold;
  letter-spacing: .08em;
  text-decoration: none;
  animation: bbs-chaka .65s steps(1, end) infinite;
}

.product-link {
  margin-top: 18px;
  font-size: 1.15rem;
  font-weight: bold;
}

.music-title { font-size:clamp(1.45rem,7vw,2.8rem); }

.music-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.music-card {
  min-width:0;
  margin:0;
  padding:10px;
  border-color:#f06;
  background:#fff0f7;
}

.music-card h2 { color:#c0006f; }
.music-card p { margin-bottom:0; }

.youtube-frame {
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
  overflow:hidden;
  border:4px ridge #f0f;
  background:#000;
}

.youtube-frame iframe {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.site-banner-box {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #ff69b4;
}

.site-banner-box p { margin: 5px 0; }

.site-banner {
  width: 88px;
  height: 31px;
  border: 0;
  image-rendering: pixelated;
}

a:link { color: #00e; }
a:visited { color: #609; }
a:hover { color: #f00; background: #ff0; }

code { color: #800000; }

.main-menu {
  font-size:clamp(10px,2.8vw,.9rem);
  white-space:nowrap;
}

.main-menu p { margin-inline:-4px; }

.blink {
  color: #f00;
  font-weight: bold;
  animation: blink 1s steps(1, end) infinite;
}

footer { font-size: .85rem; color: #555; }

@keyframes blink { 50% { visibility: hidden; } }

@keyframes construction-flash {
  50% { filter: invert(1); }
}

@keyframes bbs-chaka {
  33% { color:#ff0; background:#f06; border-color:#fff; transform:translateY(-1px); }
  66% { color:#000080; background:#0ff; border-color:#f0f; box-shadow:-3px 3px 0 #ff0; }
}

@media (prefers-reduced-motion: reduce) {
  .blink,
  .new-sign,
  .bbs-open-sign,
  .construction-sign { animation: none; }
}

.banner {
  margin: 8px 4px 0;
  vertical-align: middle;
  border: 0;
}

@media (max-width: 480px) {
  main {
    width: calc(100% - 12px);
    padding: 14px 10px 32px;
  }

  h1 {
    font-size: clamp(1.35rem, 7vw, 2.7rem);
    letter-spacing: .03em;
  }

  .subtitle { font-size: .9rem; }

  .face {
    width: 96%;
    margin-block: 18px;
    border-width: 4px;
  }

  hr { margin-block: 22px; }

  section {
    margin-block: 22px;
    padding: 12px 8px;
  }

  .retro-grid { grid-template-columns: 1fr; }
  .music-grid { grid-template-columns:1fr; }

  .env-info { line-height: 1.6; }
}
