* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  background: #cfe3f6;
  color: #1d1a2b;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  overflow-x: hidden;
}

@keyframes bg-animation {
  0% {
    background-position: left;
  }
  100% {
    background-position: right;
  }
}
header {
  height: 90px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  header {
    height: auto;
    padding: 10px 5%;
    justify-content: center;
  }
}
header .logo_content {
  animation: fallin 0.7s ease-in forwards;
  display: flex;
  align-items: center;
  margin-right: 30px;
}
header .logo_content img {
  margin-right: 25px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.223px solid black;
  box-shadow: 5px 4px 5px #1d1a2b;
}
@media (max-width: 760px) {
  header .logo_content img {
    margin-right: 25px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.223px solid black;
    box-shadow: 4px 3px 6px cyan;
  }
}
header .logo_content img:hover {
  box-shadow: 5px 4px 5px cyan;
  width: 80px;
  height: 80px;
  border: 2.223px solid #1d1a2b;
  animation: wiggle 1.8s ease infinite;
  transition: animation 2s ease, box-shadow 1s ease, border 1s ease, width 0.5s ease, height 0.5s ease;
}
header .logo_content .brand-text {
  margin-top: 1px;
}
header .logo_content .brand-text h1 {
  font-family: "Courier New", monospace;
  color: black;
  font-size: 1.21rem;
  margin-bottom: 0;
  text-shadow: 2px 2px 1px #1d1a2b;
}
header .logo_content .brand-text h1:hover {
  color: rgb(245, 222, 179);
  transform: scale(1.1);
  transition: transform 0.2s ease-in, text-shadow 0.2s ease-in;
}
header .logo_content .brand-text .subtitle {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #524d62;
}
header .logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
header .navi1 ul {
  display: flex;
  animation: fallin_invers 0.7s ease-in forwards;
  gap: 40px;
  width: 100%;
}
@media (max-width: 760px) {
  header .navi1 ul {
    display: none;
  }
}
header .navi1 ul li a {
  display: inline-block;
  color: rgb(0, 211, 211);
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s, transform 0.2s ease-in, text-shadow 0.2s ease-in;
  text-shadow: 5px 5px 1px black;
}
header .navi1 ul li a:hover {
  color: rgb(245, 222, 179);
  transform: scale(1.1);
}
header .nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 4vw, 50px);
}
header .nav-link {
  color: rgb(245, 222, 179);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s;
}
header .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: rgb(0, 211, 211);
  transition: width 0.3s ease-in-out;
}
header .nav-link:hover::after {
  width: 100%;
}

canvas#Kotoba_bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#scroll-driver {
  height: 400vh;
}

.panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 7vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  justify-content: center;
}
.panel.active {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 760px) {
  .panel {
    align-items: flex-end;
    padding: 0 4vw calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

.card {
  max-width: 760px;
  padding: 30px;
  background: rgba(255, 250, 244, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(216, 64, 42, 0.4);
  border-radius: 4px;
  position: relative;
  top: 10%;
}
.card.wide {
  max-width: 760px;
}
@media (max-width: 760px) {
  .card {
    padding: 20px;
  }
}
.card h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  line-height: 1.2;
  margin-bottom: 14px;
}
.card h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  margin-bottom: 12px;
}
.card p, .card small {
  color: #524d62;
  line-height: 1.8;
}
.card small {
  display: block;
  font-size: 0.8rem;
}

.seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #d8402a;
  color: #fff;
  font-size: 26px;
  border-radius: 3px;
  transform: rotate(-4deg);
  margin-bottom: 16px;
}

.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}
@media (max-width: 760px) {
  .phases {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.phases b {
  display: block;
  font-size: 1.6rem;
  line-height: 1.3;
}
.phases i {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: #d8402a;
  margin-bottom: 6px;
}
.phases span {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #524d62;
}

.cta {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 12px 22px;
  background: #d8402a;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.cta:focus-visible {
  outline: 3px solid #1d1a2b;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none;
  }
}