

/* NULLLATTE — Café Style */


:root {
  --background: #ded0c7;
  --text: #3a323c;
  --accent: #a37370;
  --line: #cca795;
  --paper: #d7c1b4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "MaruMonica", sans-serif;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.site {
  max-width: 1400px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 64px 24px;
}

/* Header */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.brand h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 2px;
}

.brand p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 2px;
}

.nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 14px;
}

.language {
  display: flex;
  align-items: center;
  gap: 6px;
}

.language button {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.language button.active,
.language button[aria-pressed="true"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

html[lang="ja"] [lang="en"],
html[lang="en"] [lang="ja"] {
  display: none !important;
}

.language button:hover {
  color: var(--accent);
}

/* Main */

.main {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  padding: 64px 0;
}

.intro {
  padding-top: 24px;
}

.tagline {
  font-style: italic;
  letter-spacing: 1px;
}

.intro h2 {
  margin-top: 32px;
  font-size: 22px;
  font-weight: normal;
}

.intro p {
  margin-bottom: 28px;
}

.english {
  opacity: 0.8;
}

/* Featured Game */

.game-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 2px;
}

.featured h2 {
  margin: 16px 0 4px;
  font-size: 20px;
}

.featured p {
  margin: 0 0 12px;
}

.featured a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Footer */

footer {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  text-align: center;
}

/* Mobile */

@media (max-width: 800px) {
  .site {
    padding: 24px;
  }

  .header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .nav {
    gap: 12px 20px;
  }

  .main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 0;
  }

  .intro {
    padding-top: 0;
  }

  .brand h1 {
    font-size: 26px;
  }
}

/* Centered Café Header */

.header {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 40px 0 36px;
}

.brand {
  text-align: center;
}

.brand-icon {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  margin: 0 auto 18px;
}

.brand h1 {
  font-size: 40px;
  letter-spacing: 3px;
}

.brand p {
  margin: 0;
}

.brand-subtitle {
  margin-top: 8px !important;
  font-style: italic;
  font-size: 14px !important;
  letter-spacing: 1px !important;
}

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

.nav a {
  padding: 6px 20px;
  background: var(--paper);
  border-radius: 999px;
  font-size: 14px;
  transition: background 0.2s;
}

.nav a:hover {
  background: var(--line);
  color: var(--text);
}

.language {
  justify-content: center;
  font-size: 13px;
}

/* Mobile header adjustment */

@media (max-width: 800px) {
  .header {
    align-items: center;
    gap: 16px;
  }

  .brand h1 {
    font-size: 30px;
  }

  .brand-icon {
    width: 80px;
    height: 80px;
  }

  .nav {
    justify-content: center;
    gap: 8px;
  }

  .nav a {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* Compact Café Header */

.header {
  padding: 8px 0 24px;
  gap: 12px;
}

.brand-icon {
  margin-bottom: 8px;
}

.brand h1 {
  margin: 0;
  font-size: 36px;
}

.brand-subtitle {
  margin-top: 4px !important;
}

.nav {
  margin-top: 8px;
}

.language {
  margin-top: 0;
}

/* Bring content closer to the menu */

.main {
  padding-top: 36px;
}

/* Three-column Game Gallery */

.main {
  display: block;
  padding: 28px 0 48px;
}

.games-section {
  width: 100%;
}

.games-section h2 {
  margin: 0;
  font-size: 26px;
}

.section-subtitle {
  margin: 0 0 20px;
  font-size: 15px;
  opacity: 0.75;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.game-card {
  display: block;
  min-width: 0;
}

.game-card img,
.game-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
  border-radius: 12px;
}

.game-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
}

.game-card h3 {
  margin: 10px 0 0;
  font-size: 19px;
}

.game-card p {
  margin: 0;
  font-size: 14px;
  opacity: 0.75;
}

.game-card:hover img {
  opacity: 0.85;
}

/* Tablet */

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */

@media (max-width: 600px) {
  .game-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Tighter Header */

.site {
  padding-top: 8px;
}

.header {
  padding-top: 0;
  padding-bottom: 12px;
  gap: 4px;
}

.brand-icon {
  margin-bottom: 0;
}

.brand h1 {
  margin: 0;
}

.brand-subtitle {
  margin-top: 0 !important;
}

.nav {
  margin-top: 0;
}

.main {
  padding-top: 20px;
}
.flavor-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.flavor-filters button {
  font-family: inherit;
  font-size: 16px;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.flavor-filters button:hover {
  background: #f4e8df;
}

.flavor-filters button.active {
  background: var(--text);
  color: #fff;
}

/* 非表示のゲームはレイアウトから除外 */
[data-flavors][hidden] {
  display: none !important;
}

/* CAST */

.cast-subtitle {
  margin: 8px 0 28px;
  opacity: 0.65;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cast-card {
  min-width: 0;
}

.cast-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #cbbdb5;
}

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

.cast-card h3 {
  margin: 12px 0 0;
  font-size: 18px;
}

@media (max-width: 600px) {
  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

.cast-game {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.65;
}

/* CAST - Character selector */

.cast-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 32px 0 44px;
}

.cast-icon {
  width: 90px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.cast-icon img {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 3px solid #b9a99f;
  object-fit: cover;
  transition: transform 0.2s, border-color 0.2s;
}

.cast-icon:hover img {
  transform: scale(1.1);
}

.cast-icon.active img {
  border-color: #78575e;
}

.cast-icon span {
  display: block;
  font-size: 13px;
}

/* CAST - Shared profile */

.cast-profile {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 32px 20px;
  border-top: 2px solid #b9a99f;
  min-height: 360px;
}

.cast-profile-name h3 {
  font-size: 30px;
  margin: 0;
}

.cast-profile-art img {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.cast-profile-info {
  font-size: 15px;
  line-height: 1.8;
}

.cast-profile-info h4 {
  margin: 24px 0 8px;
  font-size: 13px;
  letter-spacing: 1px;
}

.cast-game-link {
  display: block;
  margin-bottom: 8px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cast-game-link:hover {
  opacity: 0.6;
}

@media (max-width: 650px) {
  .cast-icons {
    gap: 12px;
  }

  .cast-icon {
    width: 76px;
  }

  .cast-icon img {
    width: 64px;
    height: 64px;
  }

  .cast-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cast-profile-art img {
    max-height: 320px;
  }
}
.cast-section > h2,
.cast-subtitle {
  text-align: center;
}
.main h2 {
  text-align: center;
}
/* CAST filters */

.cast-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cast-filter {
  padding: 9px 22px;
  border: 1px solid #b9a99f;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.cast-filter:hover {
  transform: translateY(-2px);
}

.cast-filter.active {
  background: #78575e;
  border-color: #78575e;
  color: #fff;
}
.cast-filter {
  padding: 6px 15px;
  font-size: 13px;
}

.cast-filters {
  gap: 8px;
}

/* =========================
   DEVLOG
========================= */

.devlog-section {
  max-width: 900px;
  margin: 0 auto;
}

.devlog-subtitle {
  text-align: center;
  color: var(--text);
  opacity: 0.65;
  margin: 8px 0 36px;
}

.devlog-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.devlog-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
}

.devlog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 13px;
}

.devlog-meta span {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
}

.devlog-card h3 {
  margin: 18px 0 12px;
  font-size: 21px;
  color: var(--text);
}

.devlog-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
}

.devlog-readmore {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s;
}

.devlog-readmore:hover {
  transform: translateX(4px);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .devlog-card {
    padding: 22px 20px;
  }

  .devlog-card h3 {
    font-size: 18px;
  }
}

/* DEVLOG filters */

.devlog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.devlog-filter {
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.devlog-filter:hover {
  transform: translateY(-2px);
}

.devlog-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--background);
}

.devlog-card[hidden] {
  display: none;
}

/* =========================
   ABOUT
========================= */

.about-section {
  max-width: 900px;
  margin: 0 auto;
}

.about-subtitle {
  text-align: center;
  opacity: 0.65;
  margin: 8px 0 36px;
}

.about-profile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
}

.about-profile h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.about-name {
  margin: 0 0 28px;
  color: var(--accent);
  font-size: 14px;
}

.about-description {
  margin: 0;
  font-size: 16px;
  line-height: 2;
}

.about-links {
  margin-top: 40px;
}

.about-links h3 {
  font-size: 20px;
  margin-bottom: 18px;
}

.about-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.about-link {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.about-link:hover {
  background: var(--paper);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .about-profile {
    padding: 24px;
  }

  .about-description {
    font-size: 14px;
  }
}


/* ABOUT - Tools */

.about-tools {
  margin-top: 36px;
}

.about-tools h3 {
  font-size: 20px;
  margin-bottom: 18px;
}

.about-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about-tool-list span {
  padding: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}


/* ページ切り替えアニメーション */

body {
  animation: pageFadeIn 0.35s ease-out;
}

body.page-leaving {
  opacity: 0;
  transition: opacity 0.25s ease-in;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  body.page-leaving {
    transition: none;
  }
}

/* GAMES - External links */

.game-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.game-links a {
	display: inline-block;
	padding: 7px 14px;
	background: var(--background);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	font-size: 13px;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
}

.game-links a:hover {
	background: var(--paper);
	transform: translateY(-2px);
}

/* リンクではなく紹介カードとして表示 */
.game-card {
	cursor: default;
}

.game-card[hidden] {
	display: none;
}

/* GAMES - Card hover */

.game-card:hover {
	background: var(--paper);
	transform: none;
	box-shadow: none;
}

.game-card {
	cursor: default;
}

/* GAMES - Rounded cards */

.game-card {
	border-radius: 14px;
	overflow: hidden;
}

/* GAMES - Card inner spacing */

.game-card h3,
.game-card p,
.game-card .game-links {
	padding-left: 18px;
	padding-right: 18px;
}
.game-card {
	padding-bottom: 20px;
}

/* =========================
   DEVLOG - ARTICLE
========================= */

.post-article {
	max-width: 760px;
	margin: 0 auto;
}

.post-header {
	text-align: center;
	margin-bottom: 48px;
}

.post-meta {
	color: var(--accent);
	font-size: 13px;
	margin-bottom: 14px;
}

.post-header h2 {
	font-size: 28px;
	line-height: 1.6;
}

.post-content {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 44px 48px;
	font-size: 15px;
	line-height: 2.1;
}

.post-content p {
	margin: 0 0 24px;
}

.post-content h3 {
	font-size: 21px;
	margin: 52px 0 22px;
	line-height: 1.6;
}

.post-content a {
	color: var(--accent);
	text-underline-offset: 4px;
}

.post-content blockquote {
	margin: 28px 0;
	padding: 18px 24px;
	border-left: 3px solid var(--accent);
	background: var(--background);
	font-style: italic;
}

.post-table-wrap {
	overflow-x: auto;
	margin: 24px 0;
}

.post-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.post-content th,
.post-content td {
	padding: 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.post-content th {
	color: var(--accent);
}

.post-back {
	display: inline-block;
	margin-top: 36px;
	color: var(--accent);
	text-decoration: none;
}

.post-back:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.post-header h2 {
		font-size: 22px;
	}

	.post-content {
		padding: 26px 22px;
	}

	.post-content h3 {
		font-size: 19px;
	}
}

/* =========================
   DEVLOG - ARTICLE
========================= */

.post-article {
	max-width: 760px;
	margin: 0 auto;
}

.post-header {
	text-align: center;
	margin-bottom: 48px;
}

.post-meta {
	color: var(--accent);
	font-size: 13px;
	margin-bottom: 14px;
}

.post-header h2 {
	font-size: 28px;
	line-height: 1.6;
}

.post-content {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 44px 48px;
	font-size: 15px;
	line-height: 2.1;
}

.post-content p {
	margin: 0 0 24px;
}

.post-content h3 {
	font-size: 21px;
	margin: 52px 0 22px;
	line-height: 1.6;
}

.post-content a {
	color: var(--accent);
	text-underline-offset: 4px;
}

.post-content blockquote {
	margin: 28px 0;
	padding: 18px 24px;
	border-left: 3px solid var(--accent);
	background: var(--background);
	font-style: italic;
}

.post-table-wrap {
	overflow-x: auto;
	margin: 24px 0;
}

.post-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.post-content th,
.post-content td {
	padding: 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.post-content th {
	color: var(--accent);
}

.post-back {
	display: inline-block;
	margin-top: 36px;
	color: var(--accent);
	text-decoration: none;
}

.post-back:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.post-header h2 {
		font-size: 22px;
	}

	.post-content {
		padding: 26px 22px;
	}

	.post-content h3 {
		font-size: 19px;
	}
}

/* =========================
   HOME
========================= */

.home-section {
	margin-top: 64px;
}

.home-section h2 {
	margin-bottom: 24px;
}

.home-more-link {
	display: inline-block;
	margin-top: 24px;
	color: var(--accent);
	text-decoration: none;
	font-size: 14px;
	transition: transform 0.2s ease;
}

.home-more-link:hover {
	transform: translateX(4px);
	text-decoration: underline;
}

/* Latest Devlog */

#latest-devlog {
	max-width: 760px;
}

#latest-devlog .devlog-card {
	margin: 0;
}

/* About */

.home-about {
	padding-bottom: 20px;
}

.home-about-text {
	max-width: 680px;
	font-size: 15px;
	line-height: 2;
	margin-bottom: 24px;
}

.home-social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.home-social-links a {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	color: var(--text);
	text-decoration: none;
	font-size: 13px;
	transition: transform 0.2s ease, background 0.2s ease;
}

.home-social-links a:hover {
	transform: translateY(-2px);
	background: var(--background);
}

@media (max-width: 600px) {
	.home-section {
		margin-top: 44px;
	}
}

/* HOME - About 中央寄せ */

.home-about {
	text-align: center;
}

.home-about-text {
	margin-left: auto;
	margin-right: auto;
}

.home-social-links {
	justify-content: center;
}
#latest-devlog {
	margin-left: auto;
	margin-right: auto;
}

/* HOME - View All リンク右寄せ */

.home-more-link {
	display: block;
	width: fit-content;
	margin-left: auto;
	margin-right: 0;
}

/* =========================
   CAST - PROFILE CARDS
========================= */

.cast-card-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 40px;
}

.cast-card {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 24px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 14px;
	min-width: 0;
}

.cast-card[hidden] {
	display: none;
}

.cast-card-image {
	width: 150px;
	height: 150px;
	flex-shrink: 0;
	object-fit: cover;
	border-radius: 12px;
	background: var(--background);
}

.cast-card-info {
	min-width: 0;
}

.cast-card-info h3 {
	font-size: 23px;
	margin: 0 0 12px;
}

.cast-card-info p {
	font-size: 14px;
	line-height: 1.8;
	margin: 0 0 18px;
}

.cast-card-info h4 {
	font-size: 12px;
	letter-spacing: 0.06em;
	margin: 0 0 8px;
}

.cast-card-games {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	font-size: 13px;
	line-height: 1.6;
}

.cast-card-games a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cast-game-title {
	color: var(--text);
}

@media (max-width: 850px) {
	.cast-card-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.cast-card {
		gap: 16px;
		padding: 16px;
	}

	.cast-card-image {
		width: 100px;
		height: 100px;
	}

	.cast-card-info h3 {
		font-size: 20px;
	}
}

/* 小さなドット絵をくっきり拡大 */

.cast-card-image.pixel-art {
	image-rendering: pixelated;
}
/* 英語対応まで言語切り替えを非表示 */
.language {
	display: none;
}
.games-more,
.cast-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin: 36px auto 12px;
	text-align: center;
	color: var(--accent);
	letter-spacing: 0.04em;
}

.games-more p,
.cast-more p {
	margin: 0 0 8px;
	font-size: 14px;
	text-align: center;
}

.games-more small,
.cast-more small {
	display: block;
	font-size: 12px;
	text-align: center;
	opacity: 0.8;
}

/* ====================================
   NULLLATTE MINI CHARACTER
   ==================================== */

.home-about .about-walkway {
  position: relative;
  display: block;
  width: 100%;
  height: 110px;

  /* SNSリンクから離す */
  margin-top: 40px;
  margin-bottom: 20px;

  padding: 0;
  overflow: hidden;

  border-bottom: 1px solid #d8b7a8;
  box-sizing: border-box;
}

.home-about #nulllatteWalk {
  display: block;
  width: 100%;
  height: 100%;

  /* ドットをくっきり表示 */
  image-rendering: pixelated;

  background: transparent;
}

/* 小さい画面用 */
@media (max-width: 600px) {
  .home-about .about-walkway {
    height: 110px;
    margin-top: 32px;
  }
}

/* JP / EN セグメント切替 */
.header .language {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: fit-content;
  height: auto;
  margin: 14px auto 18px;
  padding: 3px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  flex-shrink: 0;
}

.header .language span {
  display: none;
}

.header .language button {
  border: none;
  border-radius: 999px;
  padding: 6px 18px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.header .language button.active,
.header .language button[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

.header .language button:hover:not(.active) {
  background: rgba(120, 87, 94, 0.12);
}

.header .language {
  margin: 10px auto 14px;
  padding: 2px;
}

.header .language button {
  min-width: 40px;
  padding: 3px 8px;
  font-size: 11px;
}

/* ヘッダーを配置の基準にする */
.header {
  position: relative;
}

/* JP / ENを右上に配置 */
.header .language {
  position: absolute;
  top: 16px;
  right: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;

  width: fit-content;
  height: auto;
  margin: 0;
  padding: 2px;

  border: 1px solid var(--accent);
  border-radius: 999px;
}

/* ボタンをコンパクトに */
.header .language button {
  min-width: 36px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 999px;
}

/* モバイルでは端に寄せる */
@media (max-width: 600px) {
  .header .language {
    top: 8px;
    right: 8px;
  }

  .header .language button {
    min-width: 32px;
    padding: 4px 6px;
  }
}

/* ==================================
   JP / EN スライドアニメーション
   ================================== */

/* トグル本体 */
.header .language {
  position: absolute;
  overflow: hidden;
  isolation: isolate;
}

/* スライドするピンクの背景 */
.header .language::before {
  content: "";
  position: absolute;

  top: 2px;
  bottom: 2px;
  left: 2px;

  width: calc((100% - 4px) / 2);
  border-radius: 999px;

  background: var(--accent);

  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);

  z-index: 0;
  pointer-events: none;
}

/* EN選択中は右にスライド */
.header .language:has(button:last-of-type.active)::before,
.header .language:has(button:last-of-type[aria-pressed="true"])::before {
  transform: translateX(100%);
}

/* ボタンはスライド背景より手前 */
.header .language button {
  position: relative;
  z-index: 1;

  min-width: 36px;
  background: transparent !important;
  text-decoration: none !important;

  transition: color 150ms ease;
}

/* 選択中の文字 */
.header .language button.active,
.header .language button[aria-pressed="true"] {
  color: #ffffff;
}

/* 非選択中の文字 */
.header .language button:not(.active):not([aria-pressed="true"]) {
  color: var(--text);
}

/* 非選択中のホバー */
.header .language button:hover:not(.active) {
  background: transparent !important;
  color: var(--accent);
}

/* 動きを減らす設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  .header .language::before,
  .header .language button {
    transition: none;
  }
}
.cast-image {
  width: 224px;
  height: 224px;
  border-radius: 24px;
  overflow: hidden;
  background: #e7d8cf;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cast-image img {
  width: 192px;
  height: 192px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* 現在開いているページ */
.nav a[aria-current="page"] {
  background: #78575e;
  color: #fff5ed;
}

/* 現在のページはホバーしても色を維持 */
.nav a[aria-current="page"]:hover {
  background: #78575e;
  color: #fff5ed;
}

/* GALLERY内のコレクション見出し */
.goods-collection-title {
  margin: 18px 0 16px;
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* GAMES：クリックできないカード全体のホバー演出を無効化 */
.game-card:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.game-card:hover img {
  opacity: 1;
}

/* 実際に押せるリンクだけ反応 */
.game-card .game-links a:hover {
  background: var(--paper);
  transform: translateY(-2px);
}

/* GAMES — Streaming & fan art policy (collapsible) */
.streaming-policy {
  max-width: 960px;
  margin: 22px auto 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}

.streaming-policy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
}

.streaming-policy-summary::-webkit-details-marker {
  display: none;
}

.streaming-policy-summary::after {
  content: "";
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  background: url("images/policy-chevron-down.png") center / contain no-repeat;
  image-rendering: pixelated;
}

.streaming-policy[open] > .streaming-policy-summary::after {
  background-image: url("images/policy-chevron-up.png");
}

.streaming-policy-summary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.streaming-policy-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.streaming-policy-summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.6;
}

.streaming-policy-summary-text strong {
  font-size: 15px;
  font-weight: normal;
}

.streaming-policy-summary-text > span {
  font-size: 12px;
  opacity: 0.78;
}

.streaming-policy-content {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.9;
}

.streaming-policy-content p {
  margin: 0 0 12px;
}

.streaming-policy-content h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  font-weight: normal;
}

.streaming-policy-content ul {
  margin: 0 0 14px;
  padding-left: 1.5em;
}

.streaming-policy-content li {
  margin-bottom: 8px;
}

.streaming-policy-lead {
  font-size: 15px;
}

.streaming-policy-tag {
  white-space: nowrap;
  overflow-wrap: normal;
}

.streaming-policy-content .streaming-policy-outro {
  margin-top: 22px;
  margin-bottom: 0;
  text-align: center;
}

@media (max-width: 600px) {
  .streaming-policy {
    margin-top: 18px;
  }

  .streaming-policy-summary {
    padding: 12px 14px;
  }

  .streaming-policy-summary-text strong {
    font-size: 14px;
  }

  .streaming-policy-content {
    padding: 16px;
    font-size: 13px;
  }
}




/* HOME only — centered, step-by-step featured carousel. */
.home-featured { min-width: 0; margin-top: 36px; }
.hf-window { overflow: hidden; touch-action: pan-y; cursor: grab; }
.hf-window.hf-dragging { cursor: grabbing; }
.hf-track { display: flex; gap: 24px; align-items: stretch; will-change: transform; }
.hf-card { flex: 0 0 calc((100% - 48px) / 3); min-width: 0; border-radius: 12px; padding: 0; overflow: hidden; user-select: none; }
.hf-card .hf-main { display: block; position: relative; }
.hf-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--paper); border-radius: 12px; image-rendering: pixelated; -webkit-user-drag: none; }
/* Titles overlay the image: no extra vertical space. */
.hf-card h3 {
  position: absolute; inset: auto 0 0; margin: 0;
  padding: 24px 14px 10px; font-size: 19px; line-height: 1.4;
  color: #fff8f2; background: linear-gradient(transparent, rgba(58,50,60,.92));
  opacity: 0; transition: opacity 180ms ease; pointer-events: none;
}
.hf-main:hover h3, .hf-main:focus-visible h3 { opacity: 1; }
@media (hover: none), (pointer: coarse) { .hf-card h3 { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hf-card h3 { transition: none; } }
@media (min-width: 601px) and (max-width: 900px) { .hf-card { flex-basis: calc((100% - 24px) / 2); } }
.hf-card :focus-visible, .hf-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hf-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 18px; }
.hf-controls button { font: inherit; color: inherit; border: 1px solid var(--line); background: transparent; border-radius: 999px; width: 36px; height: 36px; cursor: pointer; }
.hf-controls button:hover { background: var(--paper); }
.hf-count { font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .home-featured { margin-top: 28px; } .hf-track { gap: 12px; } .hf-card { flex-basis: 84%; } .hf-card h3 { font-size: 17px; } }



    .home-about { padding-bottom: 0; }
    .home-about .about-walkway {
      height: 170px;
      margin-bottom: 0;
      border-bottom: 0;
    }
    .main { padding-bottom: 0; }

    /* HOME only: a single, unobtrusive collaboration banner. */
    .home-cafe-banner {
      margin: 48px auto 56px;
      padding: 0 12px;
      text-align: center;
    }
    .home-cafe-banner a {
      display: block;
      width: 100%;
      max-width: 800px;
      margin-inline: auto;
      border-radius: 8px;
      overflow: hidden;
      line-height: 0;
      transition: transform 180ms ease, box-shadow 180ms ease;
    }
    .home-cafe-banner a:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(91, 14, 14, .12);
    }
    .home-cafe-banner a:focus-visible {
      outline: 3px solid #934D4F;
      outline-offset: 4px;
    }
    .home-cafe-banner img {
      display: block;
      width: 100%;
      height: auto;
    }
    @media (max-width: 640px) {
      .home-cafe-banner { margin: 28px auto 36px; padding: 0 4px; }
    }
    @media (prefers-reduced-motion: reduce) {
      .home-cafe-banner a { transition: none; }
      .home-cafe-banner a:hover { transform: none; }
    }
  


/* Experimental HOME only; no shared site files modified. */
body {animation:none; font-family: Arial, "Noto Sans JP", sans-serif; line-height:1.65;}
.site {max-width:none; padding:0 clamp(22px,5vw,92px) 22px;}
.header.exp-hero {min-height:100vh; min-height:100svh; position:relative; display:block; border:0; padding:0; isolation:isolate;}








.exp-hero-content {position:absolute;left:0;right:19%;top:clamp(58px,9vh,86px);transform:none;}
.exp-title {position:relative;width:100%;height:auto;aspect-ratio:5.1/1;margin:0;line-height:1; color:var(--text);font-size:clamp(38px,11vw,170px);font-weight:800;letter-spacing:-.045em;}
.exp-title canvas {position:absolute;inset:0;width:100%;height:100%;display:none;pointer-events:none;}
.exp-title.is-drawn canvas {display:block;}
.exp-title.is-drawn span {position:absolute; width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.exp-scroll {position:absolute;bottom:28px;left:50%;transform:translateX(-50%);font-size:11px;letter-spacing:.2em;color:#6b5258;display:flex;align-items:center;gap:9px;}
.exp-scroll span {font-size:20px;}
.main {padding-top:0;}
.exp-section {border-top:1px solid var(--line);padding-top:26px; margin-top:0;}
.exp-section .exp-heading {text-align:right;font-size:clamp(22px,3.5vw,42px);font-weight:500;letter-spacing:-.035em;margin:0 0 34px;line-height:1.2;}
.exp-heading span {font-size:12px;letter-spacing:.03em;color:#6b5258;margin-right:12px;vertical-align:middle;}
.exp-section .home-featured {margin-top:0;}
.home-cafe-banner a {max-width:800px;}
.home-about {padding-top:26px;}
#log {padding-bottom:64px;}
.hf-controls button {font-size:15px;}
@media(max-width:600px){
 .site {padding-inline:20px;}
 
 .exp-hero-content{top:72px;right:44%;transform:none;}.exp-title{aspect-ratio:1.55/1;font-size:clamp(26px,9vw,56px);overflow-wrap:anywhere;}
 .exp-scroll{bottom:18px;}.exp-section .exp-heading{margin-bottom:24px;}
}
@media(max-height:600px) and (min-width:601px){.header.exp-hero{min-height:640px;}}
@media(max-height:650px) and (max-width:600px){.header.exp-hero{min-height:660px;}}

/* Experiment v2: alternating section signs, mug at the end. */
#log .exp-heading {text-align:left;}
.exp-about-mug {display:block;width:96px;height:96px;object-fit:contain;image-rendering:pixelated;margin:0 auto 16px;}
@media(max-width:600px){.exp-about-mug{width:80px;height:80px;}}


/* Experiment v4: repeated letters turn downward on a shared square grid. */

.exp-hero-content {top:clamp(68px,9vh,94px);right:22%;}
.exp-title {width:min(100%, 760px, max(390px, calc((100svh - 155px) * 1.1468)));aspect-ratio:125/109;overflow:visible;}
@media(max-width:600px){
 
 .exp-hero-content{top:68px;right:44%;}
 .exp-title{width:100%;aspect-ratio:125/109;}
}


/* V6: quiet square gallery, independent of the animated hero. */
.header.exp-hero {min-height:92vh;min-height:92svh;}
.exp-title {width:min(100%, 810px, max(390px, calc((92svh - 145px) * 1.1468)));}
#featured {min-height:100vh;min-height:100svh;display:flex;flex-direction:column;padding-top:clamp(30px,5vh,64px);padding-bottom:clamp(32px,6vh,76px);}
#featured .exp-heading {display:flex;align-items:center;justify-content:flex-end;gap:14px;margin:0;line-height:1;}
#featured .exp-heading .fg-number {flex:none;margin:0;}
.fg-title {position:relative;display:block;width:min(100%, 354px, 64vw);aspect-ratio:6.4/1;margin:0;}
.fg-title canvas {display:none;width:100%;height:100%;}
.fg-title.is-drawn canvas {display:block;}
#featured .fg-title .fg-text {font-size:inherit;color:var(--text);margin:0;}
.fg-title.is-drawn .fg-text {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
#featured .home-featured {flex:1;display:flex;align-items:center;margin:clamp(24px,5vh,60px) 0;min-width:0;}
#featured .hf-window {width:100%;overflow:visible;cursor:auto;touch-action:auto;}
#featured .hf-track {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(90%, calc(150svh + 80px));margin-inline:auto;gap:clamp(14px,2.5vw,40px);align-items:center;}
#featured .hf-card {padding:0;border-radius:9px;overflow:hidden;min-width:0;}
#featured .hf-card img {aspect-ratio:1/1;border-radius:9px;object-fit:cover;}
#featured .hf-main:focus-visible {outline:3px solid var(--accent);outline-offset:-4px;}
#featured .hf-main:hover {color:inherit;}
@media(max-width:600px){
 .header.exp-hero {min-height:max(600px,90svh);}
 .exp-title {width:100%;}
 #featured {padding-top:30px;padding-bottom:36px;}
 #featured .exp-heading {gap:10px;}
 .fg-title {width:min(78%,270px);}
 #featured .home-featured {margin:24px 0 0;}
 #featured .hf-track {grid-template-columns:1fr;justify-items:center;width:88%;gap:12px;}
 #featured .hf-card {width:min(64vw, 25svh, 230px);}
}
/* V7: a continuous exhibition, with no carousel controls or title overlays. */
/* V8: repeat the first artwork at the desktop exhibition edge. */
@media (max-width:600px), (hover:none), (pointer:coarse), (prefers-reduced-motion:reduce) { #featured .hf-repeat {display:none;} }
#featured .home-featured {margin-inline:calc(-1 * clamp(22px,5vw,92px));}
#featured .hf-window {overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y;}
#featured .hf-window::-webkit-scrollbar {display:none;}
#featured .hf-track {display:flex;width:max-content;margin:0;padding:5px clamp(22px,5vw,92px);gap:clamp(16px,2.1vw,36px);transform:none;will-change:auto;}
#featured .hf-card {flex:0 0 clamp(210px,24vw, min(480px,52svh));width:clamp(210px,24vw,min(480px,52svh));}
#featured .hf-main:focus-visible {outline:3px solid var(--text);outline-offset:-4px;}
#featured .hf-main:focus-visible img {outline:3px solid var(--text);outline-offset:-4px;}
#featured .hf-main {cursor:pointer;}
#featured .hf-window.look-active .hf-main {cursor:none;}
.exp-look {position:fixed;left:0;top:0;z-index:100;display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:#6b5258;color:#ded0c7;font:600 12px/1 Arial,sans-serif;letter-spacing:.13em;pointer-events:none;transform:translate(-50%,-50%);}
.exp-look[hidden] {display:none;}
@media(max-width:600px){
 #featured .home-featured {margin-inline:-20px;margin-top:24px;margin-bottom:24px;}
 #featured .hf-track {padding-inline:20px;gap:16px;}
 #featured .hf-card {flex-basis:min(76vw,46svh);width:min(76vw,46svh);}
}

@media(max-height:600px) and (min-width:601px){.header.exp-hero {min-height:640px;}.exp-title {width:min(100%,570px);}}


/* V10: a large, silent, scroll-driven dialogue. */
@font-face {font-family: MessagePixel; src: local("MaruMonica"),url("fonts/MaruMonica.ttf") format("truetype"); font-display:swap;}
#message {min-height:100svh;display:flex;flex-direction:column;padding:clamp(30px,5vh,64px) 0 clamp(45px,9vh,100px);}
#message .exp-heading {text-align:left;margin:0;font-size:clamp(22px,3.5vw,42px);}
.msg-body {flex:1;display:flex;align-items:center;padding:clamp(48px,10vh,108px) 0;}
.msg-copy {font-family:MessagePixel,"Noto Sans CJK JP","Yu Gothic",sans-serif;font-size:clamp(30px,4.55vw,82px);line-height:1.55;letter-spacing:.025em;margin:0;color:#23232e;font-weight:400;width:100%;}
.msg-line {display:block;}
.msg-glyph {position:relative;display:inline-block;white-space:pre;vertical-align:baseline;}
.msg-glyph.is-waiting {visibility:hidden;}
.msg-glyph canvas {position:absolute;width:100%;height:1.12em;left:0;top:.19em;image-rendering:pixelated;pointer-events:none;}
.msg-copy.is-bitmap .msg-glyph {color:transparent;}
.msg-accent {color:#6b5258;}
.msg-end {display:inline-block;width:.37em;height:.29em;margin-left:.25em;vertical-align:.05em;background:#6b5258;clip-path:polygon(0 0,100% 0,100% 25%,80% 25%,80% 50%,60% 50%,60% 75%,40% 75%,40% 50%,20% 50%,20% 25%,0 25%);}
.msg-end.is-waiting {visibility:hidden;}
.msg-end:not(.is-waiting) {animation:msg-bounce 1.25s cubic-bezier(.36,0,.35,1) infinite;}
@keyframes msg-bounce {0%,42%,100%{transform:translateY(0)} 20%{transform:translateY(-.14em)} 32%{transform:translateY(-.04em)}}
@media(max-width:600px){#message{padding-top:30px;min-height:88svh;} .msg-copy{font-size:clamp(23px,6.5vw,36px);line-height:1.65;} .msg-body{padding:42px 0;} }
@media(prefers-reduced-motion:reduce){.msg-end:not(.is-waiting){animation:none;}}

/* V11: alternate signs; hold the dialogue briefly, then leave a quiet pause. */
#featured .exp-heading {justify-content:flex-start;}
#message {display:block;min-height:0;padding:0;}
#message::after {content:"";display:block;height:38svh;}
.msg-stage {position:sticky;top:var(--msg-sticky-top,0px);min-height:100svh;display:flex;flex-direction:column;padding:clamp(30px,5vh,64px) 0 clamp(30px,5vh,60px);}
#message .exp-heading {text-align:right;}
.msg-body {padding:clamp(26px,5vh,60px) 0;}
#about .exp-heading {text-align:left;}
.msg-pause {min-height:clamp(180px,42svh,420px);display:flex;align-items:center;justify-content:center;gap:clamp(16px,2.4vw,36px);}
.msg-pause-dot {display:block;width:20px;height:16px;background:#6b5258;clip-path:polygon(0 0,100% 0,100% 25%,80% 25%,80% 50%,60% 50%,60% 75%,40% 75%,40% 50%,20% 50%,20% 25%,0 25%);transition:opacity 180ms ease,transform 180ms ease;}
.msg-pause-dot:nth-child(2) {background:#a37370;}
.msg-pause-dot:nth-child(3) {background:#cca795;}
.msg-pause-dot.is-waiting {opacity:0;transform:translateY(-6px);}
@media(max-width:600px){#message{min-height:0;padding:0;}#message::after{height:32svh;}.msg-stage{padding:30px 0;}.msg-body{padding:30px 0;}.msg-pause-dot{width:16px;height:13px;}}
@media(prefers-reduced-motion:reduce){#message::after{display:none;}.msg-stage{position:static;}.msg-pause-dot{transition:none;}}




/* V12: common punctuation between sections and a matching static HELLO sign. */
#message .exp-heading {display:flex;align-items:center;justify-content:flex-end;gap:14px;line-height:1;}
#message .fg-number {flex:none;margin:0;}
#message .hello-title {width:clamp(100px,13vw,166px);aspect-ratio:3/1;}
#message .hello-title .fg-text {font-size:inherit;color:var(--text);margin:0;}
#about .home-social-links {gap:clamp(22px,4vw,54px);}
#about .home-social-links a {border:0;border-radius:0;background:transparent;padding:6px 0;color:var(--text);border-bottom:1px solid var(--line);}
#about .home-social-links a:hover {background:transparent;color:var(--accent);border-color:var(--accent);transform:none;}
@media(max-width:600px){#message .exp-heading {gap:10px;}}


.pixel-history {
  --ph-panel: #f4e8df;
  --ph-deep: #6b5258;
  --ph-max-dot-scale: 2.35;
  --ph-focus-spread: .72;
  width: 100%;
  min-width: 0;
  margin-top: 72px;
  overflow: hidden;
  color: var(--text);
}



.pixel-history-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 18px;
}

.pixel-history-header h2 {
  margin: 0;
  color: var(--ph-deep);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: .08em;
}

.pixel-history-counter {
  flex: none;
  margin: 0;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pixel-history-preview {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  min-height: clamp(300px, 38vw, 430px);
  padding: clamp(28px, 5vw, 64px);
  background: var(--ph-panel);
}

.pixel-history-preview-inner {
  display: contents;
}

.pixel-history-image-link {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.pixel-history-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--text) 72%, transparent);
  background: var(--paper);
  transform: scale(var(--preview-scale, 1));
  transition: transform 90ms linear;
}

.pixel-history-info {
  min-width: 0;
}

.pixel-history-date {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.pixel-history-title {
  margin: 0 0 18px;
  color: var(--ph-deep);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pixel-history-description {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.9;
}

.pixel-history-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pixel-history-links a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ph-panel) 82%, var(--background));
}

.pixel-history-timeline {
  padding-top: 0;
  background: var(--ph-panel);
}

.pixel-history-drag-panel {
  position: relative;
  width: 100%;
  height: 104px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  overscroll-behavior-x: contain;
}

#history .pixel-history-preview,
#history .pixel-history-timeline {
  /* Full-bleed band: match the experimental site's actual side gutters. */
  --ph-gutter: clamp(22px, 5vw, 92px);
  position: relative;
  left: auto;
  width: calc(100% + 2 * var(--ph-gutter));
  margin-inline: calc(-1 * var(--ph-gutter));
}
@media (max-width: 600px) {
  #history .pixel-history-preview,
  #history .pixel-history-timeline { --ph-gutter: 20px; }
}

#history.pixel-history {
  overflow: visible;
}

#history .pixel-history-preview {
  display: block;
  min-height: 0;
  padding: 0;
}

#history .pixel-history-preview-inner {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  width: min(900px, calc(100% - 48px));
  min-height: clamp(300px, 38vw, 430px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0;
}

.pixel-history-drag-panel.is-dragging { cursor: grabbing; }

.pixel-history-drag-panel:focus { outline: none; }
.pixel-history-drag-panel:focus-visible:not(.ph-pointer-focus),
.pixel-history-drag-panel.ph-keyboard-focus:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.pixel-history-center-guide {
  position: absolute;
  z-index: 2;
  top: 16px;
  bottom: 16px;
  left: 50%;
  width: 1px;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
  pointer-events: none;
}

.pixel-history-dot-track {
  position: absolute;
  inset: 0;
  transform: translate3d(var(--track-x, 0), 0, 0);
  will-change: transform;
  pointer-events: none;
}

.pixel-history-dot-slot {
  position: absolute;
  top: 50%;
  left: calc(var(--index) * var(--dot-spacing));
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.pixel-history-dot {
  width: clamp(7px, 1.3vw, 13px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--dot-color);
  outline: 1px solid transparent;
  transform: translateY(calc(var(--focus, 0) * -7px)) scale(calc(1 + var(--focus, 0) * (var(--ph-max-dot-scale) - 1)));
  transform-origin: center;
  transition: transform 65ms linear, outline-color 65ms linear;
  will-change: transform;
  cursor: inherit;
}

.pixel-history-dot.is-nearest {
  outline-color: var(--text);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .pixel-history { margin-top: 52px; }
  .pixel-history-preview {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
    padding: 28px 20px 34px;
  }
  #history .pixel-history-preview-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    width: calc(100% - 40px);
    min-height: 0;
    padding: 28px 0 34px;
  }
  .pixel-history-image-link { max-width: 190px; }
  .pixel-history-info { text-align: center; }
  .pixel-history-description { font-size: 14px; }
  .pixel-history-links { justify-content: center; }
  .pixel-history-drag-panel { height: 92px; }
  .pixel-history-dot { width: clamp(6px, 2vw, 9px); }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-history-dot,
  .pixel-history-image { transition: none; }
}
.pixel-history-jam {
  display: block;
  width: fit-content;
  margin: 4px 0 12px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.pixel-history-jam[hidden] {
  display: none;
}
#message .msg-copy {font-size:clamp(24px,3.5vw,51px);line-height:1.35;letter-spacing:0;max-width:100%;}
#message .msg-line {margin-bottom:.15em;}
#message .msg-line:first-child {margin-bottom:.45em;}
#message .msg-japanese {font-size:.78em;line-height:1.5;}
#message .msg-japanese:nth-last-child(2) {margin-top:.5em;}
#message .msg-glyph {height:1em;vertical-align:-.14em;letter-spacing:0;color:transparent;}
#message .msg-ink {position:absolute;inset:0;background:#23232e;mask-size:100% 100%;mask-repeat:no-repeat;image-rendering:pixelated;}
#message .msg-accent .msg-ink {background:#6b5258;}
#message .msg-word {display:inline-block;white-space:nowrap;}
#message .msg-body {padding:clamp(24px,4vh,48px) 0;}
#about .exp-profile {display:flex;align-items:center;justify-content:space-between;text-align:left;gap:24px;margin:clamp(24px,6vh,64px) auto 36px;max-width:900px;}
#about .exp-profile h3 {font-size:clamp(30px,4vw,58px);font-weight:500;line-height:1;margin:0 0 8px;}
#about .exp-profile p {margin:0;color:#6b5258;}
.exp-author-sprite {width:96px;height:96px;flex:none;background-image:url("images/nulllatte_walk.png");background-size:960px 96px;image-rendering:pixelated;animation:exp-author-idle 1.1s step-end infinite;}
@keyframes exp-author-idle {0%,49.999%{background-position:0 0}50%,100%{background-position:-96px 0}}
#about .exp-tools {max-width:900px;text-align:left;margin:0 auto 34px;}
#about .exp-tools h3 {font-size:13px;letter-spacing:.12em;color:#6b5258;margin:0 0 8px;}
#about .exp-tools p {margin:0;font-size:clamp(15px,2vw,23px);}
#about .exp-tools span {color:#a37370;margin-inline:.35em;}
#history.pixel-history {text-align:left;margin-top:72px;}
#history .pixel-history-header h2 {text-align:left;}
#history .pixel-history-links a {border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;padding:4px 0;margin-right:12px;}
#about .exp-about-mug {margin-top:42px;}
@media(max-width:600px){#message .msg-copy{font-size:clamp(22px,6vw,32px);}#message .msg-japanese{font-size:.85em;}#about .exp-profile{gap:12px;}#about .exp-profile p{font-size:13px;}#history .pixel-history{margin-top:48px;}}
@media(prefers-reduced-motion:reduce){.exp-author-sprite{animation:none;}}



/* V15: independent history, calm geometric links, original pixel typography. */
#history.pixel-history {margin:0; padding-top:clamp(30px,5vh,64px);overflow:visible;}
#history .pixel-history-header {padding:0 0 36px;align-items:center;}
#history .exp-heading,#about .exp-heading {display:flex;align-items:center;gap:14px;justify-content:flex-start;margin:0;line-height:1;}
#about .exp-heading {justify-content:flex-end;}
#history .fg-number,#about .fg-number {flex:none;margin:0;}
#history .fg-title {width:clamp(120px,17vw,220px);aspect-ratio:4.1/1;}
#about .fg-title {width:clamp(100px,13vw,166px);aspect-ratio:3/1;}
#history .fg-text,#about .fg-text {font-size:inherit;color:var(--text);margin:0;}
#history .pixel-history-title {font-size:clamp(25px,3vw,40px);line-height:1.3;overflow-wrap:normal;text-wrap:balance;}
#history .pixel-history-description {font-size:clamp(16px,1.55vw,21px);}
#history .pixel-history-preview-inner {width:min(1100px,calc(100% - 48px));}
#history .pixel-history-links a {font-size:18px;}
#about {padding-top:clamp(30px,5vh,64px);}
#about .exp-profile {display:grid;grid-template-columns:auto minmax(0,1fr) auto;justify-content:start;gap:clamp(10px,2vw,32px);max-width:1100px;margin:clamp(50px,9vh,110px) auto clamp(45px,7vh,85px);}
#about .exp-profile .exp-about-mug {width:96px;height:96px;margin:0;}
#about .exp-profile h3 {font-size:clamp(36px,5vw,68px);line-height:1.1;}
#about .exp-profile p {font-size:clamp(15px,1.5vw,21px);}
#about .exp-tools {margin:0;text-align:right;max-width:270px;}
#about .exp-tools h3 {font-size:17px;margin:0 0 10px;}
#about .exp-tools p {font-size:clamp(15px,1.6vw,21px);line-height:1.5;}
.px-render {font-weight:400!important;letter-spacing:0!important;}
.px-word {display:inline-block;white-space:nowrap;max-width:100%;}
.px-glyph {position:relative;display:inline-block;white-space:pre;color:transparent;vertical-align:baseline;line-height:inherit;}
.px-ink {position:absolute;left:0;top:50%;transform:translateY(-50%);width:100%;height:1.1875em;background:var(--px-color,currentColor);color:inherit;mask-repeat:no-repeat;mask-position:center;mask-size:100% 100%;image-rendering:pixelated;pointer-events:none;}
.px-render {--px-color:#3a323c;}
#about .exp-tools .px-word,#about .exp-tools .px-glyph,#about .exp-tools .px-ink {margin:0;}
#about .exp-tools .px-glyph {color:transparent;}
#history .pixel-history-title,#about .exp-profile h3 {--px-color:#6b5258;}
#history .pixel-history-date,#history .pixel-history-jam,#history .pixel-history-counter,#about .exp-profile p,.link-label {--px-color:#6b5258;}
#history .pixel-history-links a:hover {--px-color:#a37370;}
.link-showcase {max-width:1100px;margin:auto;text-align:left;}
#about .link-label {font-size:20px;letter-spacing:.13em;margin:0 0 15px;color:#6b5258;}
.link-mosaic {display:grid;grid-template-columns:1fr 1.9fr 1.62fr;grid-template-rows: .72fr .64fr 1fr;aspect-ratio:1.85;gap:clamp(8px,1.2vw,18px);}
.link-mosaic>* {min-width:0;min-height:0;position:relative;}
.tile-unity {grid-area:1/1/3/3;background:#23232e;}
.tile-top {grid-area:1/3/2/4;background:#a37370;}
.tile-bottom {grid-area:3/1/4/2;background:#c27f6f;}
.tile-itch {grid-area:3/2/4/3;background:#6b5258;}
.tile-x {grid-area:2/3/4/4;background:#a37370;}
.link-tile {display:grid;place-items:center;overflow:hidden;border:0!important;border-radius:0!important;padding:0!important;cursor:pointer;color:#ded0c7;}
.link-tile:hover {color:#ded0c7;transform:none;}
.link-tile canvas {width:100%;height:100%;position:absolute;inset:0;pointer-events:none;}
.link-tile .tile-fallback {font-family:MessagePixel,monospace;font-size:clamp(15px,3vw,42px);}
.link-tile.is-drawn .tile-fallback {visibility:hidden;}
.link-tile:focus-visible {outline:3px solid #23232e;outline-offset:3px;}
/* Each tile reveals once when it enters the viewport. Hover lift is independent of reveal. */
.link-mosaic.is-ready>[data-reveal] {opacity:0;transform:translateY(38px);transition:none;}
.link-mosaic.is-ready>[data-reveal].is-visible,.link-mosaic.is-ready>[data-reveal]:focus-visible {opacity:1;transform:translateY(0);transition:opacity .55s ease var(--tile-delay,0ms),transform .72s cubic-bezier(.2,.75,.25,1) var(--tile-delay,0ms),translate .22s ease;}
.link-mosaic.is-ready>.link-tile:not(.is-visible):not(:focus-visible) {pointer-events:none;}
.link-mosaic.is-ready>.link-tile:focus-visible {transition-delay:0ms;}
@media(hover:hover) and (pointer:fine){.link-mosaic.is-ready>.link-tile.is-visible:hover {translate:0 -6px;z-index:1;}}

#about .exp-residents {display:flex;justify-content:center;align-items:flex-end;gap:0;margin:clamp(50px,10vh,130px) auto 0;max-width:420px;}
#about .exp-residents .exp-author-sprite {flex:none;margin-bottom:0;}
#about .exp-residents .about-walkway {width:240px;height:150px;margin:0;border:0;}
#about .exp-residents canvas {width:100%;height:100%;}
footer {--px-color:#6b5258;font-size:18px;}
#history .pixel-history-date,#history .pixel-history-counter {font-size:18px;}
#history .pixel-history-jam {font-size:16px;}
@media(max-width:700px){#history .pixel-history-preview-inner{width:calc(100% - 40px);}#about .exp-profile{grid-template-columns:auto minmax(0,1fr);gap:8px;}#about .exp-profile .exp-about-mug{width:64px;height:64px;}#about .exp-tools{grid-column:1/-1;text-align:left;max-width:none;margin:18px 0 0;}#about .exp-profile h3{font-size:38px;}#about .exp-tools h3{font-size:18px;}#about .exp-profile p{font-size:15px;}#about .link-label{font-size:18px;}.link-mosaic{aspect-ratio:1.45;}}
@media(prefers-reduced-motion:reduce){.link-mosaic.is-ready>[data-reveal]{opacity:1;transform:none;transition:none;translate:none!important;}.link-mosaic.is-ready>.link-tile:not(.is-visible):not(:focus-visible){pointer-events:auto;}}


/* V17: retain the original bitmap glyphs; complete small UI labels. */
#history .pixel-history-header {padding-bottom:14px;}
.exp-look {font-size:21px;--px-color:#ded0c7;}








.exp-heading .fg-number.px-render {font-size:18px;--px-color:#6b5258;}
.exp-heading .fg-number .px-word,.exp-heading .fg-number .px-glyph,.exp-heading .fg-number .px-ink {font-size:inherit;margin:0;vertical-align:baseline;}
.exp-heading .fg-number .px-glyph {color:transparent;}
.exp-heading .fg-number .px-ink {vertical-align:baseline;}
.exp-scroll.px-render {font-size:17px;--px-color:#6b5258;gap:0;}
.exp-scroll.px-render span {font-size:inherit;}
.ph-separator {--px-color:#a37370;}
@media(max-width:600px){.exp-heading .fg-number.px-render{font-size:16px;}}

@media(max-width:740px){.exp-hero-content {top:max(125px,15vh);}}

.px-fallback{font-family:MessagePixel,monospace;}

/* HOME-only section navigation: five quiet square dots. */
.home-dot-nav {position:fixed;z-index:110;right:5px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:0;align-items:center;}
.home-dot-nav a {position:relative;display:grid;place-items:center;width:32px;height:30px;flex:none;outline-offset:-3px;touch-action:manipulation;}
.home-dot-nav .section-dot {width:6px;height:6px;background:#a37370;transition:transform 180ms ease,background-color 180ms ease;}
.home-dot-nav a[aria-current="location"] .section-dot {background:#23232e;transform:scale(1.65);}
.home-dot-nav a:focus-visible {outline:1px solid #6b5258;}
.home-dot-nav .section-dot-label {position:absolute;right:100%;top:50%;transform:translate(3px,-50%);white-space:nowrap;padding:2px 7px;background:#ded0c7;color:#6b5258;font:normal 16px/1.25 MessagePixel,monospace;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 140ms ease,transform 140ms ease,visibility 140ms;}
@media(hover:hover) and (pointer:fine){.home-dot-nav a:hover .section-dot-label {opacity:1;visibility:visible;transform:translate(0,-50%);}}
.home-dot-nav a:focus-visible .section-dot-label {opacity:1;visibility:visible;transform:translate(0,-50%);}
@media(max-width:740px){
  body.has-home-dot-nav {padding-bottom:calc(48px + env(safe-area-inset-bottom,0px));}
  .home-dot-nav {top:auto;right:auto;bottom:env(safe-area-inset-bottom,0px);left:50%;transform:translateX(-50%);flex-direction:row;background:#ded0c7;padding:0 4px;transition:opacity 160ms ease;}
  .home-dot-nav a {width:44px;height:44px;}
  .home-dot-nav .section-dot-label {right:auto;left:50%;top:auto;bottom:100%;transform:translate(-50%,0);}
  .home-dot-nav a:focus-visible .section-dot-label {transform:translate(-50%,0);}
  .home-dot-nav.is-at-top:not(:focus-within) {opacity:0;pointer-events:none;visibility:hidden;}
}
@media(prefers-reduced-motion:reduce){.home-dot-nav,.home-dot-nav .section-dot,.home-dot-nav .section-dot-label {transition:none;}}

/* HISTORY: reserve the tallest text layout on narrow screens only. */
#history .pixel-history-info-sizer { display: none; }
@media (max-width: 700px) {
  #history .pixel-history-preview-inner { align-items: start; }
  #history .pixel-history-preview-inner > .pixel-history-image-link { grid-area: 1 / 1; }
  #history .pixel-history-preview-inner > .pixel-history-info,
  #history .pixel-history-info-sizer { grid-area: 2 / 1; min-width: 0; }
  #history .pixel-history-info-sizer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    visibility: hidden;
    pointer-events: none;
  }
  #history .pixel-history-info-sizer > .pixel-history-info { grid-area: 1 / 1; align-self: start; }
}

/* HISTORY V25: compact mobile layout; retain the shared intrinsic text height. */
@media (max-width: 700px) {
  #history.pixel-history { padding-top: 16px; }
  #history .pixel-history-header { padding-bottom: 8px; }
  #history .pixel-history-preview-inner {
    width: calc(100% - 28px);
    gap: 8px;
    padding: 12px 0 8px;
  }
  #history .pixel-history-image-link { max-width: 170px; }
  #history .pixel-history-info { line-height: 1.35; }
  #history .pixel-history-date { font-size: 15px; line-height: 1.3; margin: 0 0 4px; }
  #history .pixel-history-title {
    font-size: clamp(19px, 5.3vw, 23px);
    line-height: 1.25;
    margin: 0 0 6px;
  }
  #history .pixel-history-description { font-size: 15px; line-height: 1.45; margin: 0 0 4px; }
  #history .pixel-history-jam { font-size: 13px; line-height: 1.3; margin: 0 auto 5px; padding: 2px 6px; }
  #history .pixel-history-links { gap: 0 12px; }
  #history .pixel-history-links a { font-size: 16px; line-height: 1.3; margin-right: 0; padding: 8px 4px; }
  #history .pixel-history-drag-panel { height: 54px; }
  #history .pixel-history-center-guide { top: 6px; bottom: 6px; }
}
@media (max-width: 700px) and (max-height: 570px) {
  #history .pixel-history-image-link { max-width: 150px; }
  #history .pixel-history-preview-inner { padding-top: 8px; gap: 6px; }
  #history.pixel-history { padding-top: 12px; }
  #history .pixel-history-drag-panel { height: 48px; }
}

/* HOME logo C: keep desktop geometry; widen only the narrow-screen hero. */
@media(max-width:600px){
 .exp-hero-content {right:10%;}
}
