:root {
  --paper: #f5f0e6;
  --paper-deep: #ebe4d4;
  --paper-edge: #e0d8c4;
  --ink: #1f1c17;
  --ink-soft: #3a352b;
  --ink-mute: #7a7263;
  --ink-faint: #a89e89;
  --vermilion: #b94a3b;
  --vermilion-deep: #8d3528;
  --indigo: #23416b;
  --indigo-soft: #3d5b85;
  --moss: #5a6b3e;
  --ochre: #a87f3e;
  --card: #fbf8f1;
  --edge: rgba(31, 28, 23, 0.1);
  --edge-strong: rgba(31, 28, 23, 0.16);
  --shadow: 0 20px 50px rgba(31, 28, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(185, 74, 59, 0.08), transparent 32rem),
    linear-gradient(180deg, var(--paper), #f8f4ec 46%, var(--paper-deep));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(31, 28, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 28, 23, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  color: var(--indigo);
  text-decoration-color: rgba(35, 65, 107, 0.32);
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--vermilion-deep);
  text-decoration-color: currentColor;
}

.site-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(185, 74, 59, 0.18);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(185, 74, 59, 0.1);
}

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

.brand-name {
  display: block;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.brand-sub {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* ピル型リンクの共通見た目。個別の border / padding / font-size は各セレクタで上書きする。 */
.site-nav a,
.genre-nav a,
.toc-nav a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a {
  min-height: 36px;
  border: 1px solid transparent;
  padding: 5px 14px;
  font-size: 0.9rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  border-color: var(--edge);
  background: rgba(251, 248, 241, 0.74);
  color: var(--vermilion-deep);
}

.site-nav a.nav-cta,
.site-nav a.nav-cta[aria-current="page"] {
  border-color: transparent;
  background: var(--vermilion-deep);
  color: var(--paper);
}

.site-nav a.nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  gap: 28px;
  align-items: stretch;
  min-height: 440px;
  padding: 24px 0 44px;
}

.hero-copy {
  min-width: 0;
  align-self: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--vermilion);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.55rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
}

.nowrap {
  white-space: nowrap;
}

.hero-lead {
  max-width: 33rem;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero-visual {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #efe5cd 0%, #bdcfd5 42%, #5d8ca0 75%, #2a4f63 100%);
  box-shadow: var(--shadow);
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  right: -6%;
  left: -4%;
  content: "";
  clip-path: polygon(0 58%, 17% 40%, 33% 53%, 51% 28%, 70% 51%, 86% 34%, 100% 48%, 100% 100%, 0 100%);
}

.hero-visual::before {
  bottom: 18%;
  height: 60%;
  background: #5b7693;
  opacity: 0.84;
}

.hero-visual::after {
  bottom: -1px;
  height: 48%;
  background: #2f4763;
}

.stamp {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 1;
  width: 118px;
  height: 118px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(251, 248, 241, 0.8);
  box-shadow: 0 16px 30px rgba(31, 28, 23, 0.14);
}

.stamp img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.visual-caption {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  color: var(--paper);
  text-shadow: 0 2px 14px rgba(31, 28, 23, 0.34);
}

.visual-caption strong {
  display: block;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-size: 1.22rem;
  line-height: 1.35;
}

.visual-caption span {
  color: rgba(245, 240, 230, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-card {
  min-height: 152px;
}

.link-card a,
.contact-panel {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 20px;
  background: rgba(251, 248, 241, 0.84);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(31, 28, 23, 0.05);
}

.link-card a:hover,
.contact-panel:hover {
  border-color: rgba(185, 74, 59, 0.34);
  transform: translateY(-2px);
}

.link-card small {
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.link-card strong {
  margin-top: 18px;
  font-size: 1.15rem;
}

.link-card span {
  margin-top: 8px;
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.page-title {
  max-width: 720px;
  padding: 32px 0 36px;
}

.page-title h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.page-title p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.content {
  width: min(100%, 760px);
  padding-bottom: 48px;
}

.content.wide {
  width: min(100%, 900px);
}

.content-section {
  border-top: 1px solid var(--edge);
  padding: 28px 0;
}

.content-section h2,
.theme-genre h2 {
  margin: 0 0 14px;
  color: var(--indigo);
  font-size: 1.32rem;
  line-height: 1.45;
  scroll-margin-top: 16px;
}

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

.content-section ul,
.support-list {
  margin: 14px 0 0;
  padding-left: 1.2em;
}

.content-section li,
.support-list li {
  margin: 6px 0;
  padding-left: 0.2em;
}

.contact-panel {
  height: auto;
  margin: 18px 0 24px;
}

.contact-panel small {
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.contact-panel a {
  margin-top: 8px;
  font-size: 1.22rem;
  font-weight: 800;
}

.meta {
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-weight: 800;
  text-decoration: none;
}

.back-link::before {
  content: "←";
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--edge);
  padding-top: 22px;
  color: var(--ink-mute);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.store-badge-link {
  text-decoration: none;
  color: inherit;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 10px;
  padding: 12px 22px 12px 18px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 16px rgba(31, 28, 23, 0.22);
  transition: opacity 0.15s, transform 0.15s;
}

.store-badge-link:hover .store-badge {
  opacity: 0.85;
  transform: translateY(-2px);
}

.store-badge-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.85;
}

.store-badge-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  opacity: 0.65;
  line-height: 1;
}

.store-badge-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-top: 3px;
}

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.qr-block img {
  display: block;
  border-radius: 6px;
}

.qr-label {
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.features {
  border-top: 1px solid var(--edge);
  padding: 32px 0 8px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 20px;
  background: rgba(251, 248, 241, 0.84);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  box-shadow: 0 10px 28px rgba(31, 28, 23, 0.05);
}

.feature-list li strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.05rem;
}

/* テーマ紹介ページ */
.table-scroll {
  margin: 8px 0 0;
  overflow-x: auto;
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.theme-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(251, 248, 241, 0.6);
  font-size: 0.92rem;
}

.theme-table th,
.theme-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--edge);
  text-align: left;
  vertical-align: top;
}

.theme-table thead th {
  background: var(--paper-deep);
  color: var(--indigo);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.theme-table tbody tr:last-child td {
  border-bottom: 0;
}

.theme-table td:first-child {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.theme-table td:nth-child(2) {
  color: var(--ink-mute);
  white-space: nowrap;
}

.theme-table td:last-child {
  min-width: 19rem;
  line-height: 1.65;
}

.faq-q {
  margin: 22px 0 8px;
  color: var(--ink);
  font-size: 1.02rem;
}

.content-section .faq-q:first-of-type {
  margin-top: 4px;
}

.cta-panel {
  margin-top: 28px;
  border: 1px solid rgba(185, 74, 59, 0.28);
  border-radius: 10px;
  padding: 28px 26px;
  background: rgba(251, 248, 241, 0.9);
  box-shadow: var(--shadow);
}

.cta-panel--art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 20px;
}

.cta-panel--art img {
  width: 96px;
  height: auto;
  justify-self: end;
}

.cta-panel h2 {
  margin: 0 0 12px;
  color: var(--vermilion-deep);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-size: 1.32rem;
  line-height: 1.4;
}

.cta-panel p {
  margin: 0;
  color: var(--ink-soft);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.cta-store {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 28, 23, 0.22);
  border-radius: 8px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.cta-store:hover {
  background: var(--ink-soft);
  color: var(--paper);
  transform: translateY(-2px);
}

.cta-ios {
  color: var(--ink-mute);
  font-size: 0.9rem;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  color: var(--ink-mute);
  font-size: 0.82rem;
}

.breadcrumb a {
  color: var(--ink-mute);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--vermilion-deep);
}

.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "›";
  margin-right: 8px;
  color: var(--ink-faint);
}

.breadcrumb span[aria-current="page"] {
  color: var(--ink-soft);
}

.section-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 18px 0 0;
}

.section-link a {
  font-weight: 800;
}

.section-link a::after {
  content: " →";
}

.section-link span {
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.page-title-with-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.page-title-with-art img {
  width: 128px;
  height: auto;
}

.genre-nav,
.toc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.genre-nav a,
.toc-nav a {
  gap: 6px;
  border: 1px solid var(--edge-strong);
  padding: 6px 14px;
  font-size: 0.86rem;
}

.genre-nav a:hover,
.toc-nav a:hover {
  border-color: rgba(185, 74, 59, 0.34);
  color: var(--vermilion-deep);
}

.genre-nav a span {
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-weight: 800;
}

.theme-genre {
  margin: 0 0 40px;
  border-top: 1px solid var(--edge);
  padding: 28px 0 0;
}

.theme-genre h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.genre-count {
  color: var(--ink-faint);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.theme-card {
  display: flex;
}

.theme-card > a {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 22px;
  background: rgba(251, 248, 241, 0.84);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(31, 28, 23, 0.05);
  transition: border-color 0.15s, transform 0.15s;
}

.theme-card > a:hover {
  border-color: rgba(185, 74, 59, 0.34);
  transform: translateY(-2px);
}

.theme-card-count {
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  padding: 2px 12px;
  color: var(--vermilion-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.theme-card strong {
  margin-top: 14px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-size: 1.24rem;
  line-height: 1.35;
}

.theme-card-desc {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--ink-mute);
  font-size: 0.9rem;
  line-height: 1.7;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (max-width: 760px) {
  .qr-block {
    display: none;
  }

  .site-shell {
    padding: 18px 16px 32px;
  }

  .site-header {
    flex-wrap: wrap;
    padding-bottom: 18px;
  }

  .site-nav a {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 0.82rem;
  }

  .page-title-with-art {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-title-with-art img {
    width: 88px;
  }

  .cta-panel--art {
    grid-template-columns: 1fr;
  }

  .cta-panel--art img {
    justify-self: start;
    width: 72px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 10px;
  }

  h1 {
    font-size: clamp(1.8rem, 7.7vw, 1.95rem);
  }

  .nowrap {
    white-space: normal;
  }

  .hero-lead {
    font-size: 0.96rem;
  }

  .stamp {
    right: 18px;
    width: 96px;
    height: 96px;
  }

  .hero-visual {
    min-height: 280px;
  }

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

  .visual-caption {
    flex-direction: column;
    align-items: flex-start;
  }
}
