:root {
  /* くすみパステル：旧サイトのパステルを、彩度を落として灰色寄りに */
  --lavender: #cbbfd4;     /* くすんだ藤色 */
  --blush: #e8e1e5;        /* グレージュピンク */
  --mint: #c8c2d8;         /* 藤鼠（右下のぼかし） */
  --accent: #7d5878;       /* 深いプラム（リンク・ラベル） */
  --accent-soft: #b3a4bf;  /* 灰紫 */
  --logo: #b56fb4;         /* ロゴ「クロウラ」は旧サイトからの紫 */
  --ink: #2c2930;
  --text: #3a3640;
  --muted: #6c6673;
  --card: rgba(255, 255, 255, .5);
  --card-border: rgba(255, 255, 255, .7);
  --line: rgba(44, 41, 48, .12);
  --bg: #e8e1e5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lavender: #352e40;
    --blush: #24202a;
    --mint: #2f2b40;
    --accent: #d3aad2;
    --accent-soft: #81739a;
    --logo: #d9a3d8;
    --ink: #efe9f1;
    --text: #e2dce6;
    --muted: #a39cab;
    --card: rgba(38, 33, 46, .55);
    --card-border: rgba(255, 255, 255, .08);
    --line: rgba(255, 255, 255, .1);
    --bg: #1c1922;
  }
}
:root[data-theme="dark"] {
  --lavender: #352e40;
  --blush: #24202a;
  --mint: #2f2b40;
  --accent: #d3aad2;
  --accent-soft: #81739a;
  --logo: #d9a3d8;
  --ink: #efe9f1;
  --text: #e2dce6;
  --muted: #a39cab;
  --card: rgba(38, 33, 46, .55);
  --card-border: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .1);
  --bg: #1c1922;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Shippori Mincho", "Noto Serif JP", serif;
  line-height: 1.9;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
/* 画像が親要素からはみ出さないように（CSSの指定が効かない場合の保険） */
img { max-width: 100%; height: auto; }

/* ---------- 背景：ゆっくり動くメッシュグラデーション + 粒子感 ---------- */
.backdrop { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.blob {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(80px); opacity: .9;
  animation: drift 28s ease-in-out infinite alternate;
}
.blob.b1 { background: var(--lavender); top: -20vmax; left: -15vmax; }
.blob.b2 { background: var(--mint); bottom: -25vmax; right: -20vmax; animation-delay: -9s; }
.blob.b3 { background: var(--blush); top: 30%; left: 35%; width: 40vmax; height: 40vmax; animation-delay: -16s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8vmax, 6vmax) scale(1.1); }
  100% { transform: translate(-6vmax, 10vmax) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 現行サイトの「四角が昇りながら丸になる」パーティクルを控えめに継承 */
.particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; margin: 0; padding: 0; list-style: none; }
.particles li {
  position: absolute; bottom: -60px; display: block;
  background: var(--accent-soft); opacity: 0;
  animation: rise linear infinite;
}
.particles li:nth-child(1)  { left: 8%;  width: 6px;  height: 6px;  animation-duration: 13s; }
.particles li:nth-child(2)  { left: 22%; width: 14px; height: 14px; animation-duration: 17s; animation-delay: -3s; }
.particles li:nth-child(3)  { left: 38%; width: 8px;  height: 8px;  animation-duration: 11s; animation-delay: -6s; }
.particles li:nth-child(4)  { left: 55%; width: 18px; height: 18px; animation-duration: 20s; animation-delay: -1.5s; }
.particles li:nth-child(5)  { left: 70%; width: 10px; height: 10px; animation-duration: 15s; animation-delay: -9s; }
.particles li:nth-child(6)  { left: 84%; width: 12px; height: 12px; animation-duration: 18s; animation-delay: -4.5s; }
.particles li:nth-child(7)  { left: 93%; width: 6px;  height: 6px;  animation-duration: 12s; animation-delay: -7.5s; }
@keyframes rise {
  0%   { transform: translateY(0) rotate(0); opacity: 0; border-radius: 2px; }
  10%  { opacity: .7; }
  100% { transform: translateY(-110vh) rotate(540deg); opacity: 0; border-radius: 50%; }
}

/* ---------- ナビ（ガラス調のピル） ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10;
  display: flex; align-items: center; gap: 4px; padding: 6px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 999px;
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 8px 30px rgba(48, 46, 51, .08);
}
.nav a, .nav button {
  font: 500 .95rem/1 "Cormorant Garamond", serif; letter-spacing: .08em;
  color: var(--text); text-decoration: none; padding: 10px 16px; border-radius: 999px;
  background: none; border: 0; cursor: pointer; transition: background .2s, color .2s;
}
.nav a:hover, .nav button:hover { background: var(--accent-soft); color: var(--ink); }
.nav .sep { width: 1px; height: 18px; background: var(--line); }

/* ---------- ヒーロー ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center;
  padding: 120px 16px 28px; text-align: center;
}
.hero-inner { flex: 1; align-content: center; }
.hero-inner { display: grid; gap: 28px; justify-items: center; }
.eyebrow {
  font: italic 500 clamp(1rem, 2.4vw, 1.3rem)/1 "Cormorant Garamond", serif;
  letter-spacing: .3em; color: var(--muted); text-transform: uppercase;
}
.logo {
  margin: 0; font-family: "Reggae One", cursive; font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 7.5rem); line-height: 1.05; color: var(--ink);
  letter-spacing: .02em;
}
.logo span { display: block; }
.logo span:last-child { color: var(--logo); }
.lead { margin: 0; color: var(--muted); font-size: clamp(.95rem, 2.2vw, 1.1rem); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.scroll-cue {
  margin-top: 56px;
  font: italic 500 .85rem/1 "Cormorant Garamond", serif; letter-spacing: .3em; color: var(--muted);
  text-decoration: none; display: grid; justify-items: center; gap: 10px;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 48px; background: linear-gradient(var(--muted), transparent);
  animation: cue 2.4s ease-in-out infinite; transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- セクション共通 ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 96px 16px; }
@media (min-width: 720px) { .section { padding: 120px 32px; } }
.section-head {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px;
  border-bottom: 1px solid var(--line); padding-bottom: 16px;
}
.section-head .num { font: italic 500 1.1rem/1 "Cormorant Garamond", serif; color: var(--accent); }
.section-head h2 {
  margin: 0; font: 500 clamp(2.2rem, 6vw, 3.4rem)/1 "Cormorant Garamond", serif;
  letter-spacing: .06em; color: var(--ink);
}
.section-head .ja { margin-left: auto; font-size: .85rem; color: var(--muted); }

.category { margin-bottom: 64px; }
.category-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 20px; }
.category-head h3 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.category-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.category-head .rule-link {
  margin-left: auto; font-size: .9rem; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}

/* ---------- カード（ベントー風グリッド） ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: 22px; text-decoration: none;
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 30px rgba(48, 46, 51, .06);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 18px 40px rgba(120, 80, 140, .15); }
.card .kicker { font: italic 500 .9rem/1 "Cormorant Garamond", serif; letter-spacing: .15em; color: var(--accent); }
/* 日本語のラベルは明朝体（イタリックにすると崩れるため） */
.card .kicker.ja { font: 600 .8rem/1 "Shippori Mincho", serif; letter-spacing: .1em; }
.card h4 { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.5; color: var(--ink); }
.card .outline { margin: 0; color: var(--text); font-size: .98rem; }
.card .arrow {
  position: absolute; top: 24px; right: 24px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted);
  transition: background .3s, color .3s, transform .3s;
}
.card:hover .arrow { background: var(--ink); color: var(--bg); transform: rotate(-45deg); }
.card.wide { grid-column: 1 / -1; }
/* トレーラー画像（カード上部いっぱいに表示） */
.card-cover {
  display: block; width: calc(100% + 56px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  margin: -28px -28px 4px; border-radius: 21px 21px 0 0; border-bottom: 1px solid var(--card-border);
}
.card.compact { padding: 22px 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.chip {
  font-size: .78rem; line-height: 1; padding: 7px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 35%, transparent); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent-soft) 60%, transparent);
}
.chip.warn { background: color-mix(in srgb, #e08a9a 22%, transparent); border-color: color-mix(in srgb, #e08a9a 45%, transparent); }

/* ---------- 外部サービスへの動線 ---------- */
.category { scroll-margin-top: 90px; }
.tags .chip { text-decoration: none; transition: background .2s, color .2s; }
.tags .chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.platforms { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.platform {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 18px; border-radius: 14px;
  text-decoration: none; border: 1px solid var(--line); background: var(--card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .2s, color .2s, border-color .2s;
}
.platform .name { font-weight: 800; color: var(--ink); }
.platform .desc { font-size: .8rem; color: var(--muted); }
a.platform:hover { background: var(--ink); border-color: var(--ink); }
a.platform:hover .name, a.platform:hover .desc { color: var(--bg); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.btn {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; font-size: .88rem;
  text-decoration: none; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent);
  transition: background .2s, color .2s, border-color .2s;
}
a.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* URL未設定のもの（準備中） */
.is-soon { opacity: .55; cursor: default; border-style: dashed !important; }
.card.is-soon:hover { transform: none; }
.links .is-soon {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-size: .9rem; border: 1px solid var(--line);
}

/* ---------- プロフィール ---------- */
.profile {
  display: grid; gap: 32px; padding: 36px; border-radius: 28px;
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
@media (min-width: 720px) { .profile { grid-template-columns: auto 1fr; align-items: center; padding: 48px; } }
/* アイコン：パステルのグラデーションリングで囲む */
.avatar {
  width: 160px; height: 160px; border-radius: 50%; padding: 5px; justify-self: center;
  background: conic-gradient(from 200deg, var(--lavender), var(--mint), var(--accent-soft), var(--blush), var(--lavender));
  box-shadow: 0 12px 32px rgba(120, 80, 140, .18);
}
/* 透過画像の背後にリングと同系の色（ライト／ダークに追従） */
.avatar span {
  display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, var(--blush), var(--lavender) 55%, var(--mint));
}
.avatar img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  transform: scale(.92); /* 全身をリング内に収める */
}
@media (max-width: 719px) { .profile { text-align: center; } .profile .links { justify-content: center; } }
.profile h3 { margin: 0 0 4px; font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.profile .roman { margin: 0 0 16px; font: italic 500 1.05rem/1 "Cormorant Garamond", serif; color: var(--muted); letter-spacing: .1em; }
.profile p { margin: 0 0 8px; }
.profile .note { font-size: .85rem; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font-size: .9rem; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent);
  transition: background .2s, color .2s, border-color .2s;
}
.links a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.links svg { width: 16px; height: 16px; }

footer { text-align: center; padding: 48px 16px 64px; color: var(--muted); font-size: .85rem; }
footer .mark { font-family: "Reggae One", cursive; color: var(--ink); font-size: 1.1rem; display: block; margin-bottom: 6px; }

/* ---------- 利用規約ページ ---------- */
.page-hero { padding: 140px 16px 24px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.page-hero .logo-sm { margin: 0; font-family: "Reggae One", cursive; font-weight: 400; font-size: clamp(1.4rem, 4vw, 1.8rem); color: var(--ink); text-decoration: none; }
.page-hero h1 { margin: 0; font-size: clamp(1.8rem, 5.5vw, 2.8rem); font-weight: 800; line-height: 1.4; color: var(--ink); }
.page-hero .lead { max-width: 36em; }

.rules { max-width: 760px; margin: 0 auto; padding: 48px 16px 32px; }
.rules ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: rule; }
.rule {
  counter-increment: rule; position: relative; padding: 24px 24px 24px 76px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.rule::before {
  content: counter(rule, decimal-leading-zero); position: absolute; left: 24px; top: 22px;
  font: italic 500 1.5rem/1 "Cormorant Garamond", serif; color: var(--accent);
}
.rule h2 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.rule p { margin: 0; }
.rule.ng h2::after, .rule.ok h2::after, .rule.ask h2::after {
  display: inline-block; margin-left: 10px; vertical-align: .15em;
  font-size: .72rem; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 999px;
}
.rule.ng h2::after  { content: "禁止"; background: color-mix(in srgb, #e08a9a 25%, transparent); border: 1px solid color-mix(in srgb, #e08a9a 50%, transparent); }
.rule.ok h2::after  { content: "OK"; background: color-mix(in srgb, #8fc79a 25%, transparent); border: 1px solid color-mix(in srgb, #8fc79a 50%, transparent); }
.rule.ask h2::after { content: "お願い"; background: color-mix(in srgb, var(--accent-soft) 35%, transparent); border: 1px solid color-mix(in srgb, var(--accent-soft) 60%, transparent); }
@media (max-width: 480px) {
  .rule { padding: 56px 20px 22px; }
  .rule::before { left: 20px; top: 20px; }
}

.contact-box { text-align: center; color: var(--muted); font-size: .92rem; margin: 40px 0 0; }
.contact-box .links { justify-content: center; }
.back { display: flex; justify-content: center; padding: 24px 16px 0; }
.back a {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 999px;
  text-decoration: none; border: 1px solid var(--line); background: var(--card);
  transition: background .2s, color .2s;
}
.back a:hover { background: var(--ink); color: var(--bg); }

/* ---------- 最初に開いた時だけ昇る泡 ---------- */
.bubbles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute; bottom: -70px; border-radius: 50%; opacity: 0;
  background: var(--c);
  animation: bubble-rise var(--dur) cubic-bezier(.35,.1,.55,1) var(--delay) forwards;
}
/* 輪っか型（イラスト風のフラットな丸と輪を混ぜる） */
.bubble.ring { background: none; border: 2.5px solid var(--c); }
@keyframes bubble-rise {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  12%  { opacity: .4; }
  50%  { transform: translate(var(--sway), -55vh) scale(1); }
  85%  { opacity: .3; }
  100% { transform: translate(calc(var(--sway) * -1), -115vh) scale(1.08); opacity: 0; }
}

/* ---------- スクロールで浮かび上がる ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal:nth-child(2), .page-hero .reveal:nth-child(2) { transition-delay: .15s; }
.hero .reveal:nth-child(3), .page-hero .reveal:nth-child(3) { transition-delay: .3s; }
.hero .reveal:nth-child(4) { transition-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
