body {
  font-family: "Times New Roman", Times, serif;
  background-color: #f9f4e6;
  color: #3b2c1a;
  text-align: center;
  margin: 0;
  padding: 0;
}

header {
  margin-top: 40px;
}

.audio-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 20;
  width: 56px;
  height: 56px;
}

.audio-toggle img {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-section {
  display: inline-block;
}

.logo {
  width: 80px;
  display: block;
  margin: 0 auto 10px;
}

h1 {
  font-size: 1.5em;
  margin: 5px 0;
  text-transform: none;
}

.tagline {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 25px;
  font-weight: bold;
  margin-bottom: 40px;
}

a {
  color: #c67a00;
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
  color: #ff9f1c;
}

nav a {
  text-decoration: none;
  color: #b97a16;
  transition: color 0.3s;
}

nav a:hover {
  color: #ffb300;
}

.game-embed-wrapper {
  display: flex;
  justify-content: center;
  padding: 0 16px 40px;
}

.game-embed-wrapper iframe {
  width: min(1129px, 100%);
  aspect-ratio: 1129 / 635;
  height: auto;
  display: block;
}

.game-divider {
  width: min(960px, 90%);
  height: 2px;
  margin: 0 auto 40px;
  background: linear-gradient(90deg, transparent, #b97a16, transparent);
  border-radius: 2px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 25px;
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 20px;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

@media (max-width: 600px) {
  .gallery {
    gap: 18px;
  }

  .card {
    flex-basis: 160px;
    max-width: 100%;
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 10px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  transition: transform 0.2s ease;
  will-change: transform;
  flex: 1 1 220px;
  max-width: 260px;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow: 0 10px 40px rgba(59, 44, 26, 0.08);
  transition: transform 0.2s ease;
}

.card p {
  margin-top: 8px;
  font-size: 0.95em;
  color: #3b2c1a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.about {
  max-width: 720px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.about-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 20px;
}

.about h2 {
  font-size: 1.6em;
  margin-bottom: 10px;
}

.about-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid #b97a16;
  padding-bottom: 4px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.about-link:hover {
  color: #b97a16;
  border-color: #ffb300;
}

.about p {
  font-size: 1em;
  line-height: 1.6;
}

footer {
  padding: 30px 0 50px;
}

.footer-note {
  margin: 0;
  font-size: 0.9em;
  color: #8c6a2e;
}

/* Detail pages */
.detail-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.detail-page header {
  max-width: 960px;
  margin: 30px auto 20px;
  padding: 0 20px;
  text-align: left;
}

.detail-page h1 {
  margin: 0;
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 15px;
  color: #b97a16;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  color: #ffb300;
}

.detail-page main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 60px;
  text-align: left;
  width: 100%;
  flex: 1 0 auto;
}

body[data-gallery="about"] header {
  text-align: center;
}

body[data-gallery="about"] main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.detail-description {
  margin: 0 auto 40px;
  font-size: 1em;
  line-height: 1.6;
  max-width: 780px;
  text-align: center;
  background: #fffaf2;
  border: 1px solid #e8dbc3;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 12px 32px rgba(59, 44, 26, 0.08);
}

.detail-description p {
  margin: 0;
}

.detail-lead {
  font-weight: 600;
  letter-spacing: 0.2px;
}

.detail-description a {
  color: #c67a00;
  border-bottom: 1px solid rgba(198, 122, 0, 0.35);
}

.detail-description a:hover {
  color: #ff9f1c;
  border-color: rgba(255, 159, 28, 0.7);
}

.about-bio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.about-portrait {
  width: clamp(200px, 28vw, 260px);
  max-width: 44%;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(59, 44, 26, 0.14);
}

.about-copy {
  flex: 1 1 260px;
  max-width: 520px;
  text-align: left;
}

.about-copy p {
  margin: 0;
  text-align: left;
}

.about-greeting {
  margin: 0 0 10px;
  font-size: 2.1em;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.about-mail {
  margin: 0 0 10px;
  font-size: 1.5em;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #b97a16;
  display: inline-block;

}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

.detail-item {
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  overflow: hidden;
}

.detail-item:focus-visible {
  outline: 3px solid #b97a16;
  outline-offset: 3px;
}

.detail-item:hover {
  transform: translateY(-4px);
}

.detail-item img {
  width: 100%;
  display: block;
  border-radius: 4px;
  transition: filter 0.2s ease;
}

.detail-item:hover img,
.detail-item:focus-visible img {
  filter: drop-shadow(0 10px 20px rgba(59, 44, 26, 0.25));
}

.detail-item[data-alt]::after {
  content: attr(data-alt);
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff7e5;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  max-width: calc(100% - 16px);
  text-align: center;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.detail-item:hover::after,
.detail-item:focus-visible::after {
  opacity: 1;
}

.card:hover img {
  transform: rotate(2deg);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.is-visible {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 60px;
  box-sizing: border-box;
  overflow: hidden;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  transition: transform 0.2s ease;
  cursor: zoom-in;
  will-change: transform;
}

.lightbox-image.is-zoomed {
  cursor: grab;
}

.lightbox-image.is-dragging {
  cursor: grabbing;
}

.no-js-warning {
  max-width: 960px;
  margin: 20px auto;
  padding: 15px 20px;
  background: #fff7e5;
  border-radius: 6px;
  color: #b97a16;
  text-align: left;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 2rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid #ffb300;
  outline-offset: 2px;
}

.lightbox-nav[disabled] {
  opacity: 0.4;
  cursor: default;
}

.lightbox-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.zoom-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  min-width: 44px;
  transition: background 0.2s ease, color 0.2s ease;
}

.zoom-button:hover:not(:disabled),
.zoom-button:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.zoom-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 40px;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.3em;
  }

  .about h2 {
    font-size: 1.4em;
  }

  .detail-page header {
    margin: 20px auto 15px;
  }

  .detail-gallery {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .lightbox-inner {
    padding: 20px 40px;
  }

  .lightbox-controls {
    bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
