/* File: css/style.css */
:root {
  --bg: #111214;
  --surface: #1C1E24;
  --text: #E6E6EA;
  --muted: #8E909A;
  --accent: #5B7CFA;
  --line: #2A2D35;
  --font-dot: "DotGothic16", monospace;
  --font-body: "Noto Sans JP", sans-serif;
  --max: 1120px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 18, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-dot);
  font-size: 22px;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-family: var(--font-dot);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: var(--max); 
  max-height: 78vh;
  margin: 24px auto 0;     
  overflow: hidden;
  background: #0b0c10;
}

.hero-visual {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px),
    linear-gradient(100deg, #1a1f4a 0%, #2b2f6b 35%, #15161c 70%, #0b0c10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.18);
  font-family: var(--font-dot);
  font-size: 14px;
  letter-spacing: 0.2em;
  
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain; 
  object-position: center top;
  image-rendering: pixelated;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(17,18,20,0.6) 35%, transparent 70%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
}

.eyebrow {
  font-family: var(--font-dot);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-dot);
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.3;
  margin: 8px 0 12px;
  text-shadow: 2px 0 rgba(255, 60, 90, 0.35), -2px 0 rgba(60, 220, 255, 0.35);
}

.hero-copy {
  color: var(--muted);
  margin-bottom: 24px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 4px;
  transition: opacity 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
}

/* ---------- Section ---------- */
.section {
  padding: 96px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-dot);
  font-size: 28px;
  letter-spacing: 0.12em;
}

.more {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}

.grid-items {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  display: block;
}

.thumb {
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px),
    var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-dot);
  font-size: 12px;
  letter-spacing: 0.16em;
  transition: transform 0.25s, box-shadow 0.25s;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-sq {
  aspect-ratio: 1 / 1;
}

.card:hover .thumb {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--accent);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin: 14px 0 6px;
}

.card-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.price {
  font-family: var(--font-dot);
  font-size: 15px;
  color: var(--text);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-dot);
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 2px;
}

.tag-muted {
  border-color: var(--line);
  color: var(--muted);
}

/* ---------- Shop banner ---------- */
.shop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-radius: 6px;
  padding: 40px 48px;
}

.shop p {
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}

.about-name {
  font-size: 18px;
  font-weight: 700;
}

.about-name span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.about-text {
  color: var(--text);
  margin-bottom: 20px;
}

.notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.notice:hover {
  border-bottom-color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  text-align: center;
}

.sns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.sns a {
  font-family: var(--font-dot);
  font-size: 13px;
  min-width: 72px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}

.sns a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.rating-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.copyright {
  font-family: var(--font-dot);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Sub pages ---------- */
.page-head {
  padding: 72px 0 40px;
}

.page-head .section-title {
  font-size: 34px;
}

.page-lead {
  color: var(--muted);
  margin-top: 8px;
}

.sub-main {
  padding-bottom: 96px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filters button {
  font-family: var(--font-dot);
  font-size: 13px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.filters button:hover,
.filters button.is-active {
  color: var(--text);
  border-color: var(--accent);
}

.empty {
  color: var(--muted);
  padding: 48px 0;
}

/* ---------- Game detail ---------- */
.detail-kv {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px),
    linear-gradient(100deg, #1a1f4a 0%, #15161c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.18);
  font-family: var(--font-dot);
  font-size: 14px;
  letter-spacing: 0.2em;
  margin-bottom: 40px;
}

.detail-kv img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  font-family: var(--font-dot);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.3;
  margin: 12px 0;
}

.detail-catch {
  color: var(--muted);
  margin-bottom: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  margin-top: 48px;
}

.detail-body p {
  margin-bottom: 1em;
}

.sub-title {
  font-family: var(--font-dot);
  font-size: 18px;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.info {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px 12px;
  font-size: 14px;
  background: var(--surface);
  border-radius: 6px;
  padding: 24px;
}

.info dt {
  color: var(--muted);
}

.warn {
  font-size: 13px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  margin-top: 24px;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.pager a {
  color: var(--muted);
  transition: color 0.2s;
}

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

.related {
  margin-top: 72px;
}

/* ---------- About page ---------- */
.prose {
  max-width: 720px;
}

.prose p {
  margin-bottom: 1em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    justify-content: center;
    height: auto;
    padding: 12px 0;
    gap: 6px;
  }

  .nav {
    gap: 20px;
  }

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

  .hero {
    aspect-ratio: 4 / 5;
    max-height: none;
    margin-top: 0;
  }

  .hero-content {
    bottom: 32px;
  }

  .btn {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
  }

  .section {
    padding: 64px 0;
  }

  .page-head {
    padding: 48px 0 28px;
  }

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

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

  .shop {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
  }

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

  .pager {
    flex-direction: column;
  }
}

.btn-guide {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-guide:hover {
  background: var(--surface);
}

.info dd {
  white-space: pre-line;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s;
}

.prose a:hover {
  opacity: 0.7;
}

.prose a[target="_blank"]::after {
  content: " ↗";
  font-size: 0.85em;
}

/* ---------- Contact: 追加分 ---------- */
.contact-form {
  max-width: 760px;
  margin: 0 auto;
}

.form-intro {
  max-width: 760px;
  margin: 0 auto 48px;
}

.form-caution {
  font-size: 14px;
  color: var(--muted);
}

.form-bug {
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 20px 24px;
  margin-top: 24px;
}

.form-bug p {
  font-size: 14px;
  margin-bottom: 8px;
}

.form-bug .form-bug-title {
  font-family: var(--font-dot);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--text);
}

.form-bug ul {
  margin: 0 0 0 1.2em;
  font-size: 14px;
  color: var(--muted);
}

.form-bug li {
  margin-bottom: 4px;
}

.req-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.req {
  color: var(--accent);
  margin-left: 2px;
}

.req-note .req {
  margin: 0 4px 0 0;
}

/* ---------- Contact: レイアウト調整 ---------- */
.contact-form .form-top {
  max-width: 480px;
  margin: 0 auto;
}

.contact-form .field {
  display: block;
  width: 100%;
  float: none;
}

.contact-form .field-message {
  max-width: none;
  margin-top: 8px;
}

.contact-form textarea {
  display: block;
  width: 100%;
  min-height: 320px;
  line-height: 1.7;
}

.contact-form .form-submit {
  text-align: center;
  margin-top: 8px;
}

.contact-form .form-submit .btn {
  min-width: 200px;
}

.contact-form .req-note {
  max-width: 480px;
  margin: 0 auto 24px;
}

@media (max-width: 640px) {
  .contact-form textarea {
    min-height: 240px;
  }
}

/* ---------- Thanks ---------- */
.thanks {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 0 80px;
  text-align: center;
}

.thanks .section-title {
  margin: 8px 0 32px;
}

.thanks-text {
  margin-bottom: 16px;
}

.thanks-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 40px;
}

.thanks-actions {
  justify-content: center;
}

/* ---------- About: 区切り線 ---------- */
.prose-block + .prose-block {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.prose-block .sub-title {
  margin-bottom: 24px;
}

.prose-group {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.group-title {
  font-family: var(--font-dot);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.group-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0 6px;
}

.prose ul {
  margin: 8px 0 12px 1.2em;
}

.prose li {
  margin-bottom: 6px;
}

#awards .prose li,
#media .prose li {
  list-style: none;
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px dotted var(--line);
}

#awards .prose ul,
#media .prose ul {
  margin-left: 0;
  border-top: 1px dotted var(--line);
}

#works .prose li {
  margin-bottom: 4px;
}

.prose {
  overflow-wrap: anywhere;
}

/* ---------- アンカー位置の補正 ---------- */
.prose-block {
  scroll-margin-top: 88px;
}

@media (max-width: 640px) {
  .prose-block {
    scroll-margin-top: 120px;
  }
}

/* ---------- Contact form: 基本スタイル ---------- */
.field {
  display: block;
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  color-scheme: dark;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  margin-bottom: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #0b0c10;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  aspect-ratio: 16 / 9;
  scroll-snap-align: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(17, 18, 20, 0.7);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
}

.carousel-btn:hover {
  border-color: var(--accent);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: rgba(17, 18, 20, 0.6);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .carousel-btn {
    display: none;
  }
}

/* ---------- Mini games ---------- */
.mini-notice {
  max-width: 720px;
  margin-bottom: 48px;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.mini-notice-main {
  font-size: 14px;
  margin-bottom: 8px;
}

.mini-terms summary,
.mini-credits summary {
  cursor: pointer;
  font-family: var(--font-dot);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.mini-terms ul {
  margin: 12px 0 0 1.2em;
  font-size: 13px;
  color: var(--muted);
}

.mini-terms li {
  margin-bottom: 4px;
}

.mini-card {
  display: flex;
  flex-direction: column;
}

.mini-thumb-link {
  position: relative;
  display: block;
}

.mini-thumb-link:hover .thumb {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--accent);
}

.mini-play-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: var(--font-dot);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
}

.mini-desc {
  margin: 10px 0;
}

.mini-card .tags {
  margin-top: 4px;
}

.mini-meta {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 4px 8px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
}

.mini-meta dt {
  color: var(--muted);
}

.mini-credits {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.mini-credits ul {
  margin: 8px 0 0 1.2em;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.mini-credits a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 56px;
}

.mini-page {
  min-width: 40px;
  padding: 8px 12px;
  text-align: center;
  font-family: var(--font-dot);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s;
}

a.mini-page:hover {
  color: var(--text);
  border-color: var(--accent);
}

.mini-page.is-current {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.mini-page.is-disabled {
  opacity: 0.3;
}