:root {
  --ink: #0f172a;
  --muted: #475569;
  --brand: #0ea5e9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  color: var(--ink);
  background: #fff;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.nav { display: flex; gap: 8px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 14px;
}
.nav a.active { color: #fff; background: var(--brand); }

.actions { display: flex; gap: 8px; }
.button {
  text-decoration: none;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 14px;
}
.button.ghost { color: var(--brand); background: transparent; }

.page {
  border-radius: 10px;
  background: #fff;
  padding: 8px 16px 16px;
}
.page h1 {
  margin: 0 0 10px;
  font-size: 24px;
}
.page p, .page li { line-height: 1.8; }

.page-public .page {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

.public-hero-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.top-hero {
  display: block;
  height: 55vmin;
  width: auto;
  max-width: 100%;
  animation: top-hero-swing infinite 5s linear;
  transform-origin: center center;
}

.top-tagline {
  text-align: center;
  color: var(--muted);
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.5;
}

.about-flow {
  max-width: 980px;
}

.about-hero {
  float: right;
  width: min(34vw, 340px);
  max-width: 44%;
  margin: 6px 0 12px 20px;
  animation: top-hero-swing infinite 5s linear;
  transform-origin: center center;
}

.about-flow::after {
  content: "";
  display: block;
  clear: both;
}

.footer {
  display: flex;
  gap: 14px;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}
.footer a { color: inherit; }

@keyframes top-hero-swing {
  from {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@media (max-width: 640px) {
  .layout {
    padding: 6px;
    gap: 6px;
  }

  .site-header {
    align-items: flex-start;
    padding: 8px;
  }

  .actions { width: 100%; }
  .button { text-align: center; flex: 1; }

  .page {
    padding: 2px 8px 8px;
  }

  .top-hero {
    height: 58vmin;
  }

  .top-tagline {
    font-size: 15px;
    margin-bottom: 2px;
  }

  .about-hero {
    float: none;
    display: block;
    width: min(70vw, 320px);
    max-width: 100%;
    margin: 0 auto 12px;
  }
}
