*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAFAFA;
  --text: #1A1A1A;
  --text-mid: #555555;
  --text-light: #999999;
  --border: #E0E0E0;
  --black: #1A1A1A;
  --display: 'Montserrat', sans-serif;
  --sans: 'Noto Sans JP', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'Menlo', monospace;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ─── Page ─── */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 120px 40px 100px;
}

/* ─── Header ─── */
.header {
  text-align: center;
  margin-bottom: 100px;
}

.header__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
}

.header__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 4.2rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}

.header__sub {
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 0.18em;
}

/* ─── SNS Links ─── */
.header__sns {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sns-link:hover {
  color: var(--text);
  border-color: var(--text-mid);
}

.sns-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sns-link--text {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  width: auto;
  padding: 0 12px;
  border-radius: 20px;
}

/* ─── Grid ─── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  counter-reset: game;
}

/* ─── Game Entry ─── */
.entry {
  display: flex;
  flex-direction: column;
  position: relative;
}

.entry:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0;
  right: -18px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.entry::before {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-light);
  margin-bottom: 16px;
  display: block;
  counter-increment: game;
  content: counter(game, decimal-leading-zero);
}

/* Thumbnail */
.entry__thumb {
  width: 100%;
  aspect-ratio: 128 / 67;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 24px;
}

.entry__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Titles */
.entry__title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.entry__title-en {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.entry__desc {
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  flex-grow: 1;
}

/* Actions */
.entry__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 20px;
}

.entry__actions .btn-note {
  order: -1;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #FFFFFF;
  background: var(--black);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-play:hover {
  opacity: 0.7;
}

.btn-play svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  opacity: 0.8;
}

.btn-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-note:hover {
  color: var(--text);
  border-color: var(--text-mid);
}

.btn-note svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* ─── Sub Section ─── */
.sub-section {
  margin-top: 100px;
  padding-top: 64px;
  border-top: 1px solid var(--border);
}

.sub-section__title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.repo-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.repo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.repo-item__name {
  font-size: 1rem;
  font-weight: 500;
}

.repo-item__desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-mid);
  margin-top: 4px;
}

.repo-item__links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* ─── Banner ─── */
.banner-area {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.banner-item {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.banner-item:hover {
  opacity: 1;
}

.banner-item img {
  display: block;
  height: auto;
}

/* ─── Footer ─── */
.footer {
  margin-top: 120px;
  text-align: center;
}

.footer__sns {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.footer__text {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
}

/* ─── Tablet: 2 columns ─── */
@media (max-width: 900px) {
  .page {
    max-width: 640px;
    padding: 100px 32px 80px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .header {
    margin-bottom: 80px;
  }

  .footer {
    margin-top: 88px;
  }
}

/* ─── Mobile: 1 column ─── */
@media (max-width: 560px) {
  .page {
    padding: 80px 20px 64px;
  }

  .header {
    margin-bottom: 64px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .entry__title {
    font-size: 1.15rem;
  }

  .entry:not(:last-child)::after {
    display: none;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

  .repo-item {
    border-right: none;
    padding-right: 0;
  }

  .footer {
    margin-top: 72px;
  }
}
