:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1 {
  margin-top: 0;
}

body {
  margin: 0;
  height: 70vh;
  width:auto;
  overflow: hidden;
  position: relative;
  background-color: #000;
  background-image:
    linear-gradient(135deg, rgba(255, 0, 0, 0.2) 1px, transparent 1px),
    linear-gradient(45deg, rgba(255, 0, 0, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(255, 0, 0, 0.2) 1px, transparent 1px);
  background-size: 35px 35px;
  background-position: center;
}

body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse, rgba(0,0,0,0) 50%, #000 95%);
}

.leaf {
  position: absolute;
  top: -10vh;
  width: 24px;
  height: 24px;
  background: linear-gradient(180deg, #c23 0%, #7a1 100%);
  pointer-events: none;
  opacity: 0.85;
  animation: fallSpin linear infinite;
  z-index: 2;
  transform-origin: 50% 0%;
}

.leaf--maple {
  clip-path: polygon(
    50% 0%,
    58% 18%,
    78% 22%,
    60% 34%,
    66% 52%,
    50% 42%,
    34% 52%,
    40% 34%,
    22% 22%,
    42% 18%
  );
}

.leaf--ginkgo {
  clip-path: polygon(
    50% 10%,
    70% 14%,
    86% 26%,
    92% 44%,
    84% 62%,
    66% 72%,
    50% 74%,
    34% 72%,
    16% 62%,
    8% 44%,
    14% 26%,
    30% 14%
  );
}

.leaf--sakura {
  clip-path: polygon(
    50% 0%,
    62% 10%,
    74% 26%,
    78% 44%,
    68% 60%,
    50% 74%,
    32% 60%,
    22% 44%,
    26% 26%,
    38% 10%
  );
}

.leaf--maple2 {
  clip-path: polygon(
    50% 0%,
    60% 16%,
    80% 20%,
    62% 30%,
    70% 54%,
    50% 40%,
    30% 54%,
    38% 30%,
    20% 20%,
    40% 16%
  );
}

@keyframes fallSpin {
  0%   { transform: translateY(-10vh) rotate(var(--start-rotate, 0deg)) scale(0.8); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.9; }
  100% { transform: translateY(110vh) rotate(calc(var(--start-rotate, 0deg) + var(--spin-turns, 2turn))) scale(1.1); opacity: 0; }
}

.topbar {
  position: sticky;
  top:0;
  z-index:1000;
  height: 70px;
  background:rgb(0, 0, 0);
  border-bottom:1px solid #ff0000;
  padding: 0 max(16px, env(safe-area-inset-left,0));
}

.nav-warp {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.brand-img {
  margin-left: auto;
  height: auto ;
  width: auto ;
  max-height: calc(70px - 16px) ;
  max-width: 100%;
  display: block;
  object-fit: contain;
  animation: rotate 4s linear infinite;
  border-radius: 50%;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.text {
  color: #ffee02;
  margin-left: 10px;
  margin-top: 22px;
  transition: 0.3s;
}

.text:hover {
  color: #ff0000;
  transform: scale(1.1);
}

.circle-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px auto;
}

.outer-circle {
  background: radial-gradient(circle, #f80202 70%, #ff0101 100%);
  width: 152px;
  height: 152px;
  border-radius: 50%;
  padding: 16px;
  box-shadow: 0 0 30px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.inner-circle {
  background: #ea0404;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  box-shadow: 0 0 39px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.jap-char {
  font-size: 2.5rem;
  display: inline-block;
  color: #fffb02;
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Meiryo', sans-serif;
  font-weight: bold;
  text-shadow: 0 2px 14px #c00a;
  transition: 0.3s;
  z-index: 1;
}

.jap-char:hover {
  color: #000000;
  transform: scale(1.1);
}

.welcome {
  position: relative;
  color: #f66206;
  font-size: 2rem;
  margin: auto;
  width: fit-content;
  transition: 0.3s;
  z-index: 1;
}

.welcome:hover {
  color: #ff0000;
  transform: scale(1.1);
}

.jap {
  position: relative;
  color: #ffffff;
  font-size: 2rem;
  margin: auto;
  width: fit-content;
  transition: 0.3s;
  z-index: 1;
}

.jap:hover {
  color: #ff0000;
  transform: scale(1.1);
}

.par {
  position: relative;
  max-width: 500px;
  color: #fefefe;
  text-align: center;
  font-size: 1rem;
  margin: auto;
  width: fit-content;
  transition: 0.3s;
  z-index: 1;
}

.par:hover {
  color: #ff0000;
  transform: scale(1.1);
}

.button {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 40px;
}

.dsguide {
  background-color: #d7141a;
  color: #fdfdfd;
  padding: 18px 38px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: 0.3s transform, 0.5s background;
  text-decoration: none;
}

.dsguide:hover {
  background: #000000;
  transform: scale(1.1);
  color: #ffffff;
}

.admin {
  background: #d7141a;
  color: #ffffff;
  padding: 18px 38px;
  position: relative;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  z-index: 1;
  transition: 0.3s transform, 0.5s background;
  text-decoration: none;
}

.admin:hover {
  background: #000000;
  color: #fff;
  transform: scale(1.1);
}

@media (max-width: 600px) {
  body {
    height: auto;
    overflow: visible;
  }

  .topbar {
    height: 60px;
    padding-left: env(safe-area-inset-left, 8px);
    padding-right: env(safe-area-inset-right, 8px);
  }

  .nav-warp {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .brand-img {
    margin-left: 0;
    max-height: 40px !important;

  }

  .links-right {
    margin-left: 0;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .links-right a {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .welcome,
  .jap,
  .par {
    font-size: 1.4rem;
    max-width: 90vw;
    width: auto;
    margin: 0 auto;
    text-align: center;
  }

  .button {
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
    width: 90vw;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .dsguide,
  .admin {
    width: 100%;
    padding: 14px 0;
    font-size: 1rem;
  }

  .circle-wrapper {
    margin: 20px auto;
  }

  .outer-circle,
  .inner-circle {
    width: 100px;
    height: 100px;
  }

  .jap-char {
    font-size: 1.8rem;
  }
}
