/* ===== りすのてっく サイト共通スタイル =====
   テーマ: 夜の森のピクセル工房
   - ダークベース（深紺×ダークグリーン）
   - ネオンピンク × ミント × イエローの3色アクセント（ゲームボーイ風）
   - DotGothic16（タイトル）+ M PLUS Rounded 1c（本文）
*/

:root {
  /* ベース：夜の森色 */
  --bg:        #0e1119;
  --bg-elev:   #1a1f2c;
  --bg-elev2:  #242a39;
  --line:      #2f3645;
  --line-soft: #1f2533;

  /* テキスト */
  --text:      #ecedf3;
  --muted:     #8e94a8;
  --dim:       #6b7185;

  /* アクセント3色（ゲームボーイ + ネオン） */
  --pink:      #ff6fa3;
  --pink-dim:  #c9477a;
  --mint:      #7eebcb;
  --mint-dim:  #4eb892;
  --yellow:    #ffe066;
  --yellow-dim:#c9aa3a;
  --lavender:  #c9b8ff;

  /* メインアクセント（後方互換） */
  --accent:    var(--pink);
  --accent-d:  var(--pink-dim);
  --accent-bg: rgba(255, 111, 163, 0.12);
  --link:      #ffa3c4;

  --max-w:     1080px;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-h:  0 12px 36px rgba(255, 111, 163, 0.25);
  --shadow-mint: 0 12px 36px rgba(126, 235, 203, 0.2);

  --font-pixel: 'DotGothic16', 'Press Start 2P', monospace;
  --font-body:  'M PLUS Rounded 1c', "Yu Gothic UI", "Hiragino Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 背景：ふんわり光のブロブ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 111, 163, 0.06), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(126, 235, 203, 0.05), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(255, 224, 102, 0.03), transparent 50%);
}
/* 背景：細いピクセルグリッド */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
}

body > * { position: relative; z-index: 1; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
}
a:hover { color: var(--pink); text-decoration: underline; text-shadow: 0 0 8px rgba(255, 111, 163, 0.4); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--muted); font-size: 0.9em; }

/* ===== ヘッダー ===== */
.site-header {
  background: rgba(14, 17, 25, 0.85);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.logo:hover { color: var(--pink); text-decoration: none; }
.logo-mark {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(255, 111, 163, 0.5));
}
.logo-tech {
  color: var(--mint);
  text-shadow: 0 0 10px rgba(126, 235, 203, 0.5);
}
.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a {
  color: var(--muted);
  position: relative;
  padding: 4px 2px;
}
.site-nav a:hover {
  color: var(--pink);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(255, 111, 163, 0.5);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}
.site-nav a:hover::after { transform: scaleX(1); }

/* ===== メイン ===== */
.site-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0 60px;
}

/* ===== ヒーロー（トップ用） ===== */
.hero {
  text-align: center;
  padding: 56px 20px 40px;
  position: relative;
}
.hero::before {
  content: '🌿';
  position: absolute;
  top: 20px;
  left: 8%;
  font-size: 2rem;
  opacity: 0.4;
  transform: rotate(-15deg);
}
.hero::after {
  content: '🌰';
  position: absolute;
  top: 40px;
  right: 10%;
  font-size: 1.8rem;
  opacity: 0.5;
  transform: rotate(15deg);
}
.hero h1 {
  font-family: var(--font-pixel);
  font-size: 2.4rem;
  margin: 0 0 16px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--pink);
  text-shadow:
    3px 3px 0 var(--bg-elev),
    0 0 24px rgba(255, 111, 163, 0.4),
    0 0 48px rgba(255, 111, 163, 0.2);
}
.hero h1 .accent-mint {
  color: var(--mint);
  text-shadow:
    3px 3px 0 var(--bg-elev),
    0 0 24px rgba(126, 235, 203, 0.4);
}
.hero h1 .accent-yellow {
  color: var(--yellow);
  text-shadow:
    3px 3px 0 var(--bg-elev),
    0 0 24px rgba(255, 224, 102, 0.4);
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.85;
}
.hero p.lead strong {
  color: var(--mint);
  font-weight: 700;
}
.hero .tagline {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 16px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--yellow);
  background: rgba(255, 224, 102, 0.08);
  border: 1px solid rgba(255, 224, 102, 0.3);
  border-radius: 999px;
}

/* ===== ツールカードグリッド ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin: 36px 0;
}
.tool-card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-elev2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
/* カードに薄いネオンの上端ライン */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--mint), var(--yellow));
  opacity: 0;
  transition: opacity 0.2s;
}
/* カード装飾：右上の三色ピクセルドット */
.tool-card::after {
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  width: 6px; height: 6px;
  background: var(--mint);
  border-radius: 1px;
  box-shadow:
    10px 0 0 var(--yellow),
    20px 0 0 var(--pink);
  opacity: 0.4;
  transition: opacity 0.2s;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-h);
  border-color: var(--pink);
  text-decoration: none;
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover::after { opacity: 1; }
.tool-card .icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 111, 163, 0.3));
}
.tool-card h2 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--text);
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
}
.tool-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tool-card .tag {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  background: var(--accent-bg);
  color: var(--pink);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 111, 163, 0.25);
}
.tool-card .tag:nth-child(2) {
  background: rgba(126, 235, 203, 0.1);
  color: var(--mint);
  border-color: rgba(126, 235, 203, 0.25);
}
.tool-card .tag:nth-child(3) {
  background: rgba(255, 224, 102, 0.08);
  color: var(--yellow);
  border-color: rgba(255, 224, 102, 0.25);
}
.tool-card.coming {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ===== ツール詳細ページ用 ===== */
.tool-frame {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.tool-frame iframe {
  width: 100%;
  border: none;
  display: block;
  min-height: 720px;
  background: var(--bg);
}
.tool-meta { margin-bottom: 24px; }
.tool-meta h1 {
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  font-size: 1.85rem;
  font-weight: normal;
  color: var(--pink);
  text-shadow: 2px 2px 0 var(--bg-elev), 0 0 20px rgba(255, 111, 163, 0.3);
  letter-spacing: 0.02em;
}
.tool-meta .desc {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 1rem;
}
.tool-meta .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.badge {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-elev2);
  color: var(--muted);
  border: 1px solid var(--line);
  letter-spacing: 0.04em;
}
.badge.privacy {
  background: rgba(126, 235, 203, 0.08);
  color: var(--mint);
  border-color: rgba(126, 235, 203, 0.3);
}
.badge.free {
  background: rgba(201, 184, 255, 0.08);
  color: var(--lavender);
  border-color: rgba(201, 184, 255, 0.3);
}

/* ===== 投げ銭バナー ===== */
.support-banner {
  background:
    linear-gradient(135deg, rgba(255, 111, 163, 0.1), rgba(126, 235, 203, 0.05));
  border: 1px solid rgba(255, 111, 163, 0.25);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 36px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.support-banner::before {
  content: '🌰';
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 2.5rem;
  opacity: 0.25;
  transform: rotate(20deg);
}
.support-banner p { margin: 0; flex: 1; font-size: 0.95rem; }
.support-banner .btn {
  background: linear-gradient(135deg, var(--pink), var(--pink-dim));
  color: #1a1a1f;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-weight: normal;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(255, 111, 163, 0.35);
}
.support-banner .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 111, 163, 0.5);
  text-decoration: none;
}

/* ===== AdSense 用 ===== */
.ad-slot {
  margin: 32px 0;
  text-align: center;
  min-height: 90px;
}
.ad-slot::before {
  content: 'Sponsored';
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--dim);
  margin-bottom: 6px;
  letter-spacing: 0.15em;
}

/* ===== フッター ===== */
.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  padding: 40px 0 20px;
  margin-top: 56px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink), var(--mint), var(--yellow), transparent);
  opacity: 0.5;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}
.footer-block h3 {
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  font-weight: normal;
  color: var(--mint);
  letter-spacing: 0.04em;
}
.footer-block p { margin: 0; }
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: 0.9rem; }
.copyright {
  text-align: center;
  color: var(--dim);
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.08em;
}

/* ===== 汎用テキストページ ===== */
.text-page {
  max-width: 720px;
  margin: 0 auto;
}
.text-page h1 {
  font-family: var(--font-pixel);
  font-size: 1.85rem;
  font-weight: normal;
  margin: 0 0 24px;
  color: var(--pink);
  text-shadow: 2px 2px 0 var(--bg-elev);
}
.text-page h2 {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  font-weight: normal;
  margin: 32px 0 12px;
  color: var(--mint);
  letter-spacing: 0.03em;
}
.text-page p, .text-page li { line-height: 1.85; }
.text-page ul, .text-page ol { padding-left: 1.4em; }
.text-page li { margin: 4px 0; }
.text-page table th { font-family: var(--font-pixel); font-weight: normal; }

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .site-header .container {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .site-nav { font-size: 0.82rem; gap: 14px; }
  .hero { padding: 40px 16px 32px; }
  .hero h1 { font-size: 1.6rem; }
  .hero::before, .hero::after { font-size: 1.3rem; }
  .tool-grid { gap: 14px; }
  .tool-card { padding: 18px; }
  .tool-card h2 { font-size: 1rem; }
  .tool-meta h1 { font-size: 1.4rem; }
  .text-page h1 { font-size: 1.5rem; }
  .text-page h2 { font-size: 1.05rem; }
  .support-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}
