/* =========================================================
   ねこねこネットワークネット（秘密結社のトップページ）
   色を変えたいときは、まず下の :root の値を変える
   ========================================================= */
:root {
  --bg: #0b090f;          /* ページの背景（ほぼ黒） */
  --panel: #15121b;       /* カードの地 */
  --line: #3a3142;        /* 枠線 */
  --text: #d9d2c5;        /* 本文 */
  --text-soft: #8e8597;   /* うすい文字 */
  --gold: #c9a45a;        /* 金（紋章・サイト名） */
  --gold-light: #f0d79a;
  --red: #9b2a2a;         /* 「極秘」のはんこ */
  --eye: #c9e06a;         /* ねこの目の光 */
  --moon: #e9e2c9;        /* 月 */
  --font-title: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #1d1726 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.9;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- キービジュアル ---------- */
.hero {
  position: relative;
  height: clamp(440px, 62vw, 620px);
  background: linear-gradient(#07060b 0%, #161020 55%, #241a2c 100%);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* 星（小さな点をいくつも重ねる） */
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff8, transparent),
    radial-gradient(1px 1px at 28% 8%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 44% 26%, #fff7, transparent),
    radial-gradient(1px 1px at 62% 12%, #fff5, transparent),
    radial-gradient(1px 1px at 86% 30%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 92% 9%, #fff8, transparent),
    radial-gradient(1px 1px at 6% 44%, #fff5, transparent),
    radial-gradient(1px 1px at 70% 40%, #fff4, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .6; } to { opacity: 1; } }

.moon {
  position: absolute;
  right: 12%;
  top: 9%;
  width: clamp(90px, 16vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffbe8, var(--moon) 55%, #bdb498);
  box-shadow: 0 0 60px 10px rgba(233, 226, 201, .18), 0 0 160px 40px rgba(233, 226, 201, .07);
}

/* サイト名 */
.title-block {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 8vw, 80px);
  padding: 0 16px;
  text-align: center;
}
.crest {
  width: clamp(64px, 10vw, 92px);
  height: clamp(64px, 10vw, 92px);
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(201, 164, 90, .35));
  animation: glow 5s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(201, 164, 90, .25)); }
  50% { filter: drop-shadow(0 0 18px rgba(201, 164, 90, .55)); }
}
.kicker {
  margin: 10px 0 6px;
  font-family: var(--font-title);
  font-size: clamp(10px, 1.6vw, 13px);
  letter-spacing: .5em;
  color: var(--text-soft);
}
.site-name {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1.2;
  /* 金色のグラデーション文字 */
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, #8a6a30 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 24px rgba(201, 164, 90, .25));
}
.site-name .row { display: block; font-size: clamp(44px, 10vw, 96px); letter-spacing: .12em; }
.site-name .row.small { font-size: clamp(20px, 4.4vw, 40px); letter-spacing: .28em; margin-top: 4px; }

/* 屋根とねこの影 */
.roof {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: #050408;
  z-index: 2;   /* 霧より手前 */
}
.roof::before {
  /* 屋根のでこぼこ */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -38px;
  height: 40px;
  background: #050408;
  clip-path: polygon(0 100%, 0 60%, 8% 60%, 8% 20%, 11% 20%, 11% 60%, 30% 60%, 40% 0, 50% 60%,
                     72% 60%, 72% 30%, 76% 30%, 76% 60%, 100% 60%, 100% 100%);
}
.cat {
  position: absolute;
  bottom: 52px;
  color: #050408;
  overflow: visible;
}
.c1 { left: 8%;  width: clamp(70px, 11vw, 110px); height: clamp(70px, 11vw, 110px); bottom: 50px; }
.c2 { left: calc(40% - 40px); width: clamp(56px, 8vw, 84px); height: clamp(56px, 8vw, 84px); bottom: 88px; }
.c3 { right: 10%; width: clamp(64px, 10vw, 100px); height: clamp(64px, 10vw, 100px); transform: scaleX(-1); }
/* <use> の中の絵には外側のクラスが届かないので、変数（--eye-color / --delay）で渡す */
.cat { --eye-color: var(--eye); }
.c2 { --delay: -2s; }
.c3 { --delay: -4.1s; --eye-color: #e9a64a; }
.eye { filter: drop-shadow(0 0 3px var(--eye-color, #c9e06a)); transform-origin: 50px 40px; transform-box: view-box; animation: blink 6s var(--delay, 0s) infinite; }
.tail { transform-origin: 70px 88px; transform-box: view-box; animation: tail 3s var(--delay, 0s) ease-in-out infinite; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(.08); }
}
@keyframes tail {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-12deg); }
}

/* 暗がりに光る目（<i> 2つで1組） */
.eyes-dark { position: absolute; display: flex; gap: 14px; animation: blink 7s infinite; }
.eyes-dark i {
  display: block;
  width: 12px;
  height: 6px;
  border-radius: 50%;
  background: var(--eye);
  box-shadow: 0 0 8px var(--eye);
  opacity: .8;
}
.e1 { left: 22%; bottom: 140px; animation-delay: -3s; }
.e2 { right: 28%; bottom: 120px; gap: 10px; animation-delay: -5.5s; }
.e2 i { width: 9px; height: 5px; background: #e9a64a; box-shadow: 0 0 8px #e9a64a; }

.fog {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 40px;
  height: 120px;
  background: radial-gradient(ellipse at 50% 100%, rgba(120, 100, 140, .18), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift { from { translate: -4% 0; } to { translate: 4% 0; } }

/* ---------- サイトの説明 ---------- */
.tagline {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0 16px;
  text-align: center;
  font-family: var(--font-title);
  font-size: clamp(16px, 2.6vw, 21px);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text);
}
.tagline::before, .tagline::after { content: "—"; color: var(--gold); margin: 0 .8em; }

/* スマホ幅：月を隅へ寄せ、説明文の飾り線をはずす */
@media (max-width: 600px) {
  .moon { right: -18px; top: 18px; width: 84px; }
  .tagline { letter-spacing: .06em; }
  .tagline::before, .tagline::after { content: none; }
}

/* ---------- コンテンツ一覧 ---------- */
.contents {
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 0 16px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .15em;
  color: var(--gold);
}
.crest-mini { width: 32px; height: 32px; color: var(--gold); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
a.card:hover, a.card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 10px 40px rgba(201, 164, 90, .15);
  transform: translateY(-3px);
  outline: none;
}
.thumb {
  position: relative;
  aspect-ratio: 5 / 3;
  border-bottom: 1px solid var(--line);
}
.thumb svg, .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* はんこ */
.stamp {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 2px 10px;
  border: 2.5px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .2em;
  transform: rotate(8deg);
  opacity: .9;
  background: rgba(0, 0, 0, .25);
}
.stamp.gray { border-color: #5a5262; color: #6e6577; }

.card-body { padding: 16px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.file-no {
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--gold);
}
.card-body h3 {
  margin: 4px 0 6px;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
  color: #efe8da;
}
.card-body p { margin: 0; font-size: 14px; color: var(--text-soft); }
.go {
  align-self: flex-end;
  margin-top: 16px;
  padding: 4px 18px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: .15em;
  transition: background .3s, color .3s;
}
a.card:hover .go { background: var(--gold); color: #120f16; }

/* 黒塗り */
.redact { color: #000; background: #000; letter-spacing: -.05em; user-select: none; }
.card-body h3 .redact { font-size: 16px; }
.locked { cursor: not-allowed; }
.blink-eyes { transform-origin: 100px 58px; animation: blink 5s infinite; }

/* ---------- フッター ---------- */
.footer {
  position: relative;
  margin-top: 80px;
  padding: 40px 16px 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
}
.footer p { margin: 0; }
.footer .whisper { margin-top: 4px; font-size: 11px; color: #5e5666; letter-spacing: .1em; }
.footer-eyes { position: static; justify-content: center; margin-bottom: 14px; }

/* 動きを減らす設定の人には、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
