/* css/style.css — 共通スタイル・CSS変数・リセット（ダーク宇宙テーマ） */

/* ── デザイントークン ── */
:root {
  --color-bg:           #0b0812;
  --color-surface:      rgba(255,255,255,0.04);
  --color-surface-bright: rgba(255,255,255,0.07);
  --color-text:         #f0e8f5;
  --color-text-muted:   rgba(240,232,245,0.45);
  --color-primary:      oklch(58% 0.26 338);
  --color-primary-dark: oklch(72% 0.22 338);
  --color-accent:       oklch(50% 0.26 338 / 0.12);
  --color-border:       rgba(219,89,151,0.18);
  --color-border-bright: rgba(219,89,151,0.32);
  --color-yin:          #BB8FCE;
  --color-yang:         #FFB347;
  --color-error:        #f56585;

  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  32px;
  --sp-xl:  48px;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 40px rgba(0,0,0,0.4);

  --font-base:   16px;
  --font-family: 'Noto Sans JP', sans-serif;
}

/* ── リセット ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] { display: none !important; }

html {
  font-size: var(--font-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

a:hover { text-decoration: none; }

/* ── アニメーション ── */
@keyframes twinkle {
  0%   { opacity: 0.05; transform: scale(1); }
  100% { opacity: 0.65; transform: scale(1.4); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 20px rgba(219,89,151,0.15); }
  50%     { box-shadow: 0 0 48px rgba(219,89,151,0.38); }
}

.fade-in {
  animation: fadeInUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── 背景エフェクト ── */
.glow-bottom {
  position: fixed; bottom: -25%; left: 50%; transform: translateX(-50%);
  width: 110vw; height: 110vw; max-width: 860px; max-height: 860px;
  background: radial-gradient(ellipse, rgba(150,40,130,0.18) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
.glow-tr {
  position: fixed; top: -18%; right: -8%;
  width: 55vw; height: 55vw; max-width: 480px; max-height: 480px;
  background: radial-gradient(ellipse, rgba(80,40,160,0.12) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
.glow-bl {
  position: fixed; bottom: 15%; left: -12%;
  width: 40vw; height: 40vw; max-width: 380px; max-height: 380px;
  background: radial-gradient(ellipse, rgba(40,100,180,0.08) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}

/* ── 星 ── */
#stars-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle ease-in-out infinite alternate;
}

/* ── ヘッダー（通常モードは非表示） ── */
.app-header {
  display: none;
}

/* ── レイアウト ── */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: var(--sp-lg) var(--sp-md);
  position: relative;
  z-index: 1;
}

.app-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--sp-lg) var(--sp-md) var(--sp-xl);
  font-size: 0.75rem;
  color: rgba(240,232,245,0.25);
}

.app-footer a {
  color: rgba(240,232,245,0.32);
  margin: 0 var(--sp-sm);
  text-decoration: none;
  transition: color 0.2s;
}

.app-footer a:hover {
  color: rgba(240,232,245,0.65);
}

.app-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px var(--sp-sm);
  max-width: 560px;
  margin: 0 auto var(--sp-sm);
  line-height: 1.9;
}

.app-footer__nav a {
  margin: 0;
  padding: 2px 6px;
  white-space: nowrap;
}

/* ── グラスカード ── */
.card,
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  border: 1px solid rgba(219,89,151,0.18);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 0 0 0.5px rgba(255,255,255,0.04);
}

.glass-bright {
  background: rgba(255,255,255,0.065);
  border-color: rgba(219,89,151,0.3);
  box-shadow: 0 0 32px rgba(219,89,151,0.07), 0 8px 40px rgba(0,0,0,0.35);
}

/* ── ボタン ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 15px var(--sp-lg);
  background: linear-gradient(135deg, oklch(50% 0.26 338), oklch(44% 0.22 298));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(219,89,151,0.3);
  letter-spacing: 0.06em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s;
  text-align: center;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(219,89,151,0.45);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-block;
  padding: 11px 28px;
  background: transparent;
  color: oklch(72% 0.12 338);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid rgba(219,89,151,0.3);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(219,89,151,0.1);
  border-color: rgba(219,89,151,0.5);
  text-decoration: none;
}

/* ── バッジ ── */
.badge {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(219,89,151,0.1);
  border: 1px solid rgba(219,89,151,0.25);
  color: oklch(75% 0.14 338);
}

.badge--yang {
  background: rgba(255,179,71,0.12);
  color: #FFB347;
  border-color: rgba(255,179,71,0.3);
}

.badge--yin {
  background: rgba(187,143,206,0.12);
  color: #BB8FCE;
  border-color: rgba(187,143,206,0.3);
}

.badge--gogyou {
  background: rgba(219,89,151,0.1);
  color: oklch(75% 0.14 338);
  border-color: rgba(219,89,151,0.25);
}

/* ── 広告スロット ──
   AdSense 審査通過後、以下のクラスをコンテナ <div> に付け、
   その中に <ins class="adsbygoogle" data-ad-client="ca-pub-..." data-ad-slot="..." ...></ins>
   を配置する。配置予定箇所はリポジトリの T-09 ガイドを参照。 */
.ad-slot {
  width: 100%;
  min-height: 80px;
  margin: var(--sp-lg) 0;
}

.ad-slot ins.adsbygoogle {
  display: block;
  min-height: 100px;
  border-radius: var(--radius-sm);
}

/* ── スクロールバー ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: rgba(219,89,151,0.25); border-radius: 2px; }

/* ── ユーティリティ ── */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mb-md { margin-bottom: var(--sp-md); }

/* ── Cookie同意バナー ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11,8,18,0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(219,89,151,0.2);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.cookie-banner__text {
  flex: 1;
  font-size: 0.75rem;
  color: rgba(240,232,245,0.45);
  line-height: 1.6;
}

.cookie-banner__text a {
  color: oklch(72% 0.12 338);
  text-decoration: underline;
}

.cookie-banner__btn {
  flex-shrink: 0;
  padding: var(--sp-sm) var(--sp-md);
  background: linear-gradient(135deg, oklch(50% 0.26 338), oklch(44% 0.22 298));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-banner__btn:hover { opacity: 0.85; }

@media (max-width: 480px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-md);
  }
  .cookie-banner__btn { text-align: center; }
}
