* {
  box-sizing: border-box;
}

body {
  margin: 8px;
  color: #222;
  background: #fffdf7;
  font-family: Arial, "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: #a00018;
}

a:visited {
  color: #176b3a;
}

a:hover {
  color: #08733d;
}

.page {
  display: grid;
  grid-template-columns: minmax(145px, 18%) minmax(0, 1fr);
  min-height: calc(100vh - 16px);
}

.site-sidebar {
  min-height: 100%;
  padding: 8px 10px;
  background: #edf5e9;
}

.site-nav {
  padding-top: 10px;
}

.site-nav a {
  display: block;
  margin: 0 0 18px;
  font-size: 14px;
}

.site-nav a::before {
  content: "■";
  display: inline-block;
  width: 20px;
  font-size: 10px;
  text-decoration: none;
}

.site-nav a:nth-child(1)::before {
  color: #c21f35;
}

.site-nav a:nth-child(2)::before {
  color: #168446;
}

.site-nav a:nth-child(3)::before {
  color: #b89525;
}

.site-nav a:nth-child(4)::before {
  color: #a00018;
}

.site-nav a:nth-child(5)::before {
  color: #176b3a;
}

.site-nav a[aria-current="page"] {
  font-weight: bold;
}

.site-content {
  min-width: 0;
  padding: 8px clamp(18px, 4vw, 52px) 20px;
}

.site-header {
  margin: 0 0 24px;
}

.eyebrow {
  margin: 4px 0;
  color: #555;
  font-size: 12px;
}

h1 {
  margin: 4px 0;
  color: #111;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: normal;
  line-height: 1.3;
}

.subtitle {
  margin: 5px 0;
}

section {
  margin: 22px 0;
}

h2 {
  margin: 0 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;
  color: #a00018;
  font-size: 20px;
  font-weight: normal;
}

.welcome {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.welcome p {
  margin: 7px 0;
}

.main-photo {
  display: block;
  flex: 0 0 190px;
  width: 190px;
  height: 190px;
  border: 1px solid #999;
  background: #f5f5f5;
  object-fit: cover;
}

.profile-table,
.event-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-table th,
.profile-table td,
.event-table th,
.event-table td {
  padding: 6px 8px;
  border: 1px solid #bbb;
  text-align: left;
  vertical-align: top;
}

.profile-table th,
.event-table th {
  background: #edf5e9;
  font-weight: normal;
}

.profile-table th {
  width: 32%;
}

.news-list {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 5px 10px;
  margin: 0;
}

.news-list dt {
  color: #444;
}

.news-list dd {
  margin: 0;
}

.link-box {
  padding: 10px 0;
}

.link-box ul,
.sns-list {
  margin: 0;
  padding-left: 24px;
}

.sns-list li {
  margin: 12px 0;
}

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

.photo-grid figure {
  margin: 0;
  text-align: center;
}

.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #aaa;
  background: #f5f5f5;
  object-fit: cover;
}

.photo-grid figcaption {
  padding-top: 4px;
}

.back-link {
  text-align: right;
  font-size: 14px;
}

.small-note {
  color: #666;
  font-size: 13px;
}

.site-footer {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid #ccc;
  color: #666;
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0;
}

.retro-body {
  margin: 0;
  padding: 18px 8px;
  color: #26352b;
  background-color: #f5f2e7;
  background-image: radial-gradient(#c9d8bd 1px, transparent 1px);
  background-size: 5px 5px;
  font-family: "ＭＳ ゴシック", "MS Gothic", "Osaka-Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: none;
}

.retro-page {
  display: grid;
  grid-template-areas:
    "content"
    "menu";
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 340px);
  min-height: 0;
  margin: 0 auto;
  border: 2px solid #b00020;
  background: #fffdf7;
  box-shadow: 3px 3px 0 #277447;
}

.retro-sidebar {
  grid-area: menu;
  min-height: 0;
  padding: 8px 12px;
  border-top: 2px dotted #b00020;
  background: #edf5e9;
}

.retro-page .site-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 0;
}

.retro-page .site-nav a {
  margin: 0;
  padding: 4px 7px;
  border: 1px dashed #9bbd9e;
  background: #fff;
  font-size: 13px;
  text-decoration: none;
}

.retro-page .site-nav a[aria-current="page"] {
  border-color: #b00020;
  background: #fff1e8;
}

.retro-page .site-nav a::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  background: url("assets/icon_paw.svg") center / contain no-repeat;
  vertical-align: -2px;
}

.retro-content {
  grid-area: content;
  padding: 12px 14px;
}

.retro-page .site-header {
  margin: 0 0 14px;
  padding: 6px 4px 10px;
  border-bottom: 2px dotted #b00020;
  text-align: center;
}

.retro-page .eyebrow {
  color: #176b3a;
  font-size: 11px;
}

.retro-page h1 {
  color: #a00018;
  font-size: 21px;
  font-weight: bold;
  text-shadow: none;
}

.retro-page h1:not(.home-title) {
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 #b00020, 3px 3px 0 #176b3a;
}

.home-title {
  color: #a00018;
  background: linear-gradient(90deg, #f33, #f90, #ed0, #3a5, #39f, #a4c, #e49);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(1px 1px 0 #fff) drop-shadow(2px 2px 0 #b00020) drop-shadow(3px 4px 0 #176b3a);
}

.retro-page .subtitle {
  margin: 5px 0 0;
  font-size: 12px;
}

.retro-page .marquee {
  overflow: hidden;
  white-space: nowrap;
}

.retro-page .marquee span {
  display: inline-block;
  animation: marquee-scroll 12s linear infinite;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .retro-page .marquee {
    white-space: normal;
  }

  .retro-page .marquee span {
    animation: none;
  }

}

.retro-page section {
  margin: 14px 0;
}

.link-page .site-content > section {
  text-align: center;
}

.link-page .sns-list {
  padding: 0;
  list-style: none;
}

.link-page .sns-text-button {
  display: inline-flex;
  align-items: center;
  color: #26352b;
  font-weight: bold;
  text-decoration: underline;
}

.link-page .sns-handle {
  color: #a00018;
  font-weight: bold;
  animation: handle-color 1.2s steps(2, start) infinite;
}

@keyframes handle-color {
  50% {
    color: #176b3a;
  }
}

.link-page .sns-text-button:hover {
  color: #a00018;
}

.retro-page h2 {
  margin-bottom: 7px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #a00018;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

.retro-page h2::before,
.retro-page h2::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 8px;
  background: url("assets/icon_paw.svg") center / contain no-repeat;
  vertical-align: -2px;
}

.retro-page .blinking-paws::before,
.retro-page .blinking-paws::after {
  animation: paw-blink 1s steps(2, start) infinite;
}

@keyframes paw-blink {
  to {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .retro-page .blinking-paws::before,
  .retro-page .blinking-paws::after {
    animation: none;
  }

  .link-page .sns-handle {
    animation: none;
  }
}

.retro-page .home-contents h2,
.retro-page .home-news h2 {
  text-align: center;
}

.retro-page .welcome {
  align-items: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.retro-page .welcome > div {
  text-align: center;
}

.retro-page .welcome p {
  margin: 5px 0;
}

.retro-page .main-photo {
  flex: 0 0 180px;
  width: 180px;
  height: 180px;
  border: 3px ridge #b00020;
  background: #edf5e9;
}

.retro-page .profile-photo {
  display: block;
  width: 180px;
  height: 180px;
  margin: 12px auto;
  border: 3px ridge #b00020;
  background: #edf5e9;
  object-fit: cover;
}

.retro-page .profile-table th,
.retro-page .profile-table td {
  padding: 4px 5px;
  border: 1px solid #a9bea4;
  font-size: 12px;
}

.retro-page .profile-table th {
  background: #edf5e9;
}

.retro-page .news-list {
  grid-template-columns: 78px 1fr;
  gap: 3px 5px;
  font-size: 12px;
}

.retro-page .news-list dt {
  color: #176b3a;
}

.retro-page .home-news .news-list {
  display: block;
  text-align: center;
}

.retro-page .home-news .news-list dd {
  margin-bottom: 6px;
}

.retro-page .link-box {
  padding: 0;
  border: 0;
  background: transparent;
}

.retro-page .home-links {
  padding: 0;
  list-style: none;
  text-align: center;
}

.retro-page .home-links li {
  margin: 6px 0;
}

.retro-page .home-links a,
.retro-page .social-link-buttons a {
  color: #a00018;
  text-decoration: underline;
}

.retro-page .home-links a:hover,
.retro-page .social-link-buttons a:hover {
  color: #08733d;
}

.retro-page .social-link-buttons {
  padding: 0;
  list-style: none;
  text-align: center;
}

.retro-page .home-social-links {
  text-align: center;
}

.retro-page .social-link-buttons li {
  margin: 6px 0;
}

.retro-page .link-box ul:not(.home-links):not(.social-link-buttons) {
  padding-left: 20px;
}

.retro-page .site-footer {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 2px dotted #b00020;
  font-size: 11px;
  text-align: center;
}

.access-counter {
  color: #a00018;
  font-weight: bold;
}

.access-counter span {
  display: inline-block;
  padding: 1px 5px;
  border: 1px inset #a00018;
  background: #222;
  color: #7dff8a;
  font-family: "ＭＳ ゴシック", "MS Gothic", monospace;
  letter-spacing: 0.12em;
}

@media (max-width: 600px) {
  .page {
    display: block;
  }

  .site-sidebar {
    min-height: 0;
    padding: 2px 8px;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
    padding: 6px 0;
  }

  .site-nav a {
    margin: 4px 0;
  }

  .site-content {
    padding: 16px 8px;
  }

  .welcome {
    flex-direction: column;
  }

  .main-photo {
    align-self: center;
    width: min(100%, 230px);
    height: auto;
    aspect-ratio: 1;
    flex-basis: auto;
  }

  .event-table {
    font-size: 14px;
  }

  .event-table th,
  .event-table td {
    padding: 5px;
  }

  .retro-page {
    display: grid;
  }

  .retro-sidebar {
    padding: 8px 12px;
  }

  .retro-page .site-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .retro-content {
    padding: 12px 14px;
  }

  .retro-page .welcome {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}
