:root {
  --bg: #f7f8f3;
  --bg-alt: #eef2ea;
  --text: #1f2b38;
  --subtext: #4d5b6b;
  --line: #d7ddd3;
  --brand-blue: #1736c9;
  --brand-red: #ef2c23;
  --brand-yellow: #f4de3f;
  --card-bg: #ffffff;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --header-height: 84px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.site-brand:hover { text-decoration: none; }

.site-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.site-subtitle {
  font-size: 0.9rem;
  color: var(--subtext);
  margin-top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  font-weight: 700;
  font-size: 0.96rem;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--brand-blue);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  margin: 5px auto;
}

/* Sections */
.hero-section,
.content-section {
  padding: 58px 0 72px;
  scroll-margin-top: calc(var(--header-height) + 14px);
}

.alt-section { background: var(--bg-alt); }

.section-head { margin-bottom: 28px; }

.section-head.center { text-align: center; }

.kana-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  box-shadow: 4px 4px 0 var(--brand-yellow);
}

.section-head h1,
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--brand-blue);
}

.section-lead {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text);
  font-weight: 700;
}

/* Japanese sub text: about 70% of English text */
.section-lead-ja,
.ja {
  font-size: 0.72em;
  line-height: 1.75;
  color: var(--subtext);
}

.section-lead-ja { margin: 8px 0 0; }

.image-block,
.optional-image-block {
  margin: 28px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

.text-block { margin: 10px 0 26px; }

.text-block.narrow {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.text-block h2,
.text-block h3 {
  margin: 0 0 10px;
  color: var(--brand-blue);
  line-height: 1.25;
}

.text-block h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.text-block h3 { font-size: clamp(1.35rem, 2.8vw, 2rem); }

.subhead {
  margin: 0 0 10px;
  color: var(--brand-red);
  font-weight: 700;
}

/* Home cards */
.home-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.home-link-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}

.home-link-card:hover {
  transform: translateY(-2px);
  transition: 0.2s ease;
  text-decoration: none;
}

.home-link-kana {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}

.home-link-card h3 {
  margin: 0 0 8px;
  color: var(--brand-blue);
  font-size: 1.25rem;
}

.home-link-card p {
  margin: 0 0 8px;
  color: var(--text);
}

.home-link-card .ja { color: var(--subtext); }

/* Content cards */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.status-row { margin-top: 16px; }

.status-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Mini list */
.mini-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.mini-item {
  background: #f7f9fc;
  border: 1px solid #dce4f2;
  border-radius: 14px;
  padding: 14px 16px;
}

.mini-item h4 {
  margin: 0 0 6px;
  color: var(--brand-blue);
}

.mini-item p {
  margin: 0;
  color: var(--subtext);
}

/* About grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.about-card h3 {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 1.3rem;
  line-height: 1.35;
}

.about-card p { margin: 0 0 10px; }

.about-card.full-width { grid-column: 1 / -1; }

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 36px 0 42px;
}

.footer-inner { text-align: center; }

.footer-title {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
}

.footer-subtitle {
  margin: 6px 0 10px;
  color: var(--subtext);
  font-size: 0.72rem;
}

.footer-links,
.footer-copy {
  margin: 8px 0 0;
  color: var(--subtext);
}

/* Responsive */
@media (max-width: 960px) {
  .site-nav { gap: 12px; }

  .home-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-list,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .menu-toggle { display: inline-block; }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 14px 18px;
    border-top: 1px solid #edf1eb;
  }

  .site-title { font-size: 1.2rem; }
  .site-subtitle { font-size: 0.8rem; }
}

@media (max-width: 640px) {
  .hero-section,
  .content-section {
    padding: 44px 0 56px;
  }

  .container {
    width: min(100% - 24px, 1120px);
  }

  .content-card,
  .about-card,
  .home-link-card {
    padding: 18px;
  }

  .image-block,
  .optional-image-block {
    padding: 8px;
    margin: 20px 0;
  }

  .section-head h1,
  .section-head h2 {
    font-size: 1.9rem;
  }

  .section-lead { font-size: 1rem; }
}

/* Main images: large display without inner framed card */
.main-image-block,
.optional-main-image-block {
  margin: 18px 0;
}

.main-image-block img,
.optional-main-image-block img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.aiueo-slogan .initial {
  color: var(--brand-red);
}

.compact-section-head {
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .main-image-block,
  .optional-main-image-block {
    margin-left: -4px;
    margin-right: -4px;
  }

  .main-image-block img,
  .optional-main-image-block img {
    border-radius: 8px;
  }

  .content-card .main-image-block,
  .content-card .optional-main-image-block {
    margin-left: -10px;
    margin-right: -10px;
  }
}


/* Kana section headers aligned like Home, with white background band */
.section-head-white {
  background: #ffffff;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 34px max(16px, calc((100vw - 1120px) / 2)) 18px;
  text-align: center;
}

.section-head-white + .content-card,
.section-head-white + .about-grid {
  margin-top: 18px;
}


/* --- v4 adjustments: unify kana header appearance and enlarge main images --- */

/* All kana headers now use the same simple visual level as Home */
.section-head.center.compact-section-head {
  text-align: center;
}

.compact-section-head {
  margin-bottom: 18px;
}

/* Main content groups keep their grouping, but the images can use the full card width */
.content-card {
  padding: 0 0 24px;
  overflow: hidden;
}

.content-card .text-block,
.content-card .mini-list {
  padding-left: 22px;
  padding-right: 22px;
}

.content-card .text-block {
  margin-top: 18px;
  margin-bottom: 0;
}

.content-card .main-image-block,
.content-card .optional-main-image-block {
  margin: 0 0 16px;
}

.content-card .main-image-block img,
.content-card .optional-main-image-block img {
  border-radius: 0;
}

/* Keep Home images and other non-card images nicely rounded */
main > section .main-image-block img,
main > section .optional-main-image-block img {
  border-radius: 12px;
}

/* But inside content cards, let the card itself define the outside shape */
.content-card .main-image-block img,
.content-card .optional-main-image-block img {
  border-radius: 0;
}

/* The old white-band treatment is no longer needed */
.section-head-white {
  background: transparent;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  text-align: center;
}

.section-head-white + .content-card,
.section-head-white + .about-grid {
  margin-top: 0;
}

@media (max-width: 640px) {
  .content-card {
    padding: 0 0 20px;
  }

  .content-card .text-block,
  .content-card .mini-list {
    padding-left: 18px;
    padding-right: 18px;
  }

  .content-card .main-image-block,
  .content-card .optional-main-image-block {
    margin-left: 0;
    margin-right: 0;
  }

  .content-card .main-image-block img,
  .content-card .optional-main-image-block img {
    width: 100%;
  }
}


/* --- v5: Home is independent from the あいうえお categories --- */
.home-section-head {
  padding-top: 8px;
}

/* The Same World category concept */
.category-concept {
  margin-top: 0;
  margin-bottom: 20px;
}

.category-concept h2 {
  margin-bottom: 8px;
}

.same-world-motto {
  margin: 0;
  color: var(--brand-red);
  font-weight: 800;
  font-size: 1.2rem;
}

/* One-column Home cards on phones */
@media (max-width: 640px) {
  .home-links-grid {
    grid-template-columns: 1fr;
  }
}


/* --- v9: unified あいうえお category headings --- */
.category-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 22px;
  text-align: center;
}

.category-heading .kana-mark {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.category-title {
  margin: 0;
  color: var(--brand-blue);
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  line-height: 1.2;
  font-weight: 800;
}

.category-initial {
  color: var(--brand-red);
}

/* Match the Home category cards to the same A/I/U/E/O accent */
.home-link-card h3 .category-initial {
  color: var(--brand-red);
}

@media (max-width: 640px) {
  .category-heading {
    gap: 10px;
    margin-bottom: 18px;
  }

  .category-heading .kana-mark {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }

  .category-title {
    font-size: 1.45rem;
  }
}


/* --- v10: Funny Dice feature/video section --- */
.feature-block,
.video-guide,
.release-block {
  padding: 0 22px;
  margin-top: 30px;
}

.feature-block h3,
.video-guide h3,
.release-block h3 {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 1.45rem;
}

.feature-list {
  margin: 10px 0 8px 1.2em;
  padding: 0;
}

.video-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.video-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #dce4f2;
  border-radius: 14px;
}

.video-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-weight: 800;
}

.video-text h4 {
  margin: 0 0 6px;
  color: var(--brand-blue);
  font-size: 1.08rem;
  line-height: 1.45;
}

.video-text p {
  margin: 4px 0;
}

.youtube-button {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.youtube-button:hover {
  text-decoration: none;
  opacity: 0.9;
}

.video-note {
  margin-top: 14px;
}

.release-block {
  padding-bottom: 4px;
}

@media (max-width: 640px) {
  .feature-block,
  .video-guide,
  .release-block {
    padding-left: 18px;
    padding-right: 18px;
  }

  .video-card {
    gap: 12px;
    padding: 15px;
  }

  .video-number {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .video-text h4 {
    font-size: 1rem;
  }
}


/* --- v11: clearly separate Free / Basic and Full Version --- */
.version-feature-group {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #dce4f2;
  background: #f8fafc;
}

.version-feature-group + .version-feature-group {
  margin-top: 18px;
}

.version-feature-group h4 {
  margin: 0 0 8px;
}

.version-label {
  display: inline-block;
  font-weight: 800;
  font-size: 1.02rem;
}

.free-label {
  color: var(--brand-blue);
}

.full-label {
  color: var(--brand-red);
}

.video-version-group {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #dce4f2;
  border-radius: 16px;
  background: #ffffff;
}

.full-video-group {
  margin-top: 30px;
  border-width: 2px;
}

.video-version-heading {
  margin-bottom: 16px;
}

.video-version-heading h4 {
  margin: 0 0 6px;
  color: var(--brand-blue);
  font-size: 1.3rem;
}

.full-video-group .video-version-heading h4 {
  color: var(--brand-red);
}

.video-version-tagline {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--text);
}

.free-video-group .video-card {
  border-left: 5px solid var(--brand-blue);
}

.full-video-group .video-card {
  border-left: 5px solid var(--brand-red);
}

@media (max-width: 640px) {
  .version-feature-group,
  .video-version-group {
    padding: 15px;
  }

  .video-version-heading h4 {
    font-size: 1.15rem;
  }
}


/* --- v12: common product-presentation rules --- */
.product-title {
  margin-bottom: 10px !important;
  color: var(--brand-blue);
  font-weight: 800;
}

.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.status-coming {
  background: var(--brand-red);
}

.status-development {
  background: var(--brand-blue);
}

.purchase-block {
  padding: 0 22px;
  margin-top: 30px;
}

.purchase-block h3 {
  margin: 0 0 12px;
  color: var(--brand-blue);
  font-size: 1.45rem;
}

.purchase-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 16px;
}

.purchase-summary > div {
  padding: 15px 16px;
  border: 1px solid #dce4f2;
  border-radius: 14px;
  background: #f8fafc;
}

.purchase-main {
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--text);
}

.store-actions {
  margin-top: 16px;
}

.store-button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.store-button-disabled {
  background: #e7eaf0;
  color: #6c7480;
  cursor: default;
}

.store-note {
  margin: 12px 0 0;
  color: var(--subtext);
  font-size: 0.88rem;
}

.compact-release-block {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .purchase-block {
    padding-left: 18px;
    padding-right: 18px;
  }

  .purchase-summary {
    grid-template-columns: 1fr;
  }
}
