@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    /* デフォルト：Midnight Healing (Dark) */
    --bg-color: #0f111a;
    --primary-color: #f8fafc;
    --accent-color-1: #c084fc;
    --accent-color-2: #fbbf24;
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-shadow: rgba(0, 0, 0, 0.3);
    --input-bg: rgba(255, 255, 255, 0.05);
    --border-radius: 20px;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ライトモード：Morning Sky (Light) */
body.light-mode {
    --bg-color: #f8fafc;
    --primary-color: #1e293b;
    --accent-color-1: #6366f1;
    --accent-color-2: #0ea5e9;
    --text-color: #1e293b;
    --text-light: #64748b;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.05);
    --card-shadow: rgba(0, 0, 0, 0.05);
    --input-bg: #f1f5f9;
}

body.light-mode .affiliate-section {
    background: #fff;
    border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background: radial-gradient(circle at top right, #1e293b, #0f111a);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
    min-height: 100vh;
}

body.light-mode {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* 共通レイアウト */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

header a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: var(--transition);
}

header a:hover {
    color: var(--accent-color-2);
    text-shadow: 0 0 10px var(--accent-color-2);
}

.ad-disclosure {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color);
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    padding: 5px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    opacity: 0.8;
}

.ad-disclosure::before {
    content: "PR";
    font-size: 0.6rem;
    background: var(--accent-color-1);
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
}

h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: 0.15em;
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* カードスタイル */
.card {
    position: relative; /* ストレッチリンクの基準点 */
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.4s ease, 
                border-color 0.4s ease, 
                box-shadow 0.4s ease;
    cursor: pointer; /* 全体が押せることを示す */
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(192, 132, 252, 0.4); /* ラベンダーの光 */
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color-1);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.btn:hover {
    filter: brightness(0.95);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: var(--accent-color-2);
}

/* グリッドレイアウト */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 楽天アフィリエイトエリア */
.affiliate-section {
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 商品カード・デザインシステム */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color-1);
    box-shadow: 0 15px 30px var(--card-shadow);
}

.product-card-img {
    width: 100%;
    height: 180px;
    object-fit: contain; /* 画像全体を表示するように変更 */
    background: #f8fafc; /* 背景色で余白を埋める */
    border-bottom: 1px solid var(--card-border);
    padding: 10px; /* 枠線に画像がくっつかないよう余白を追加 */
}

.product-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 12px;
}

.product-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.product-card-price {
    display: none; /* 価格を非表示 */
}

.product-card-shop {
    display: none; /* ショップ名を非表示 */
}

.product-card-cta {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color-1);
    letter-spacing: 0.05em;
    margin-top: 5px;
}

/* リスト形式の商品カード (16personal, tarot用) */
.product-list-card {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.product-list-card:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.product-list-img {
    width: 120px;
    height: 120px;
    object-fit: contain; /* リスト形式でも全体表示 */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    flex-shrink: 0;
    padding: 5px;
}

.product-list-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card-insight {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 6px;
    margin-bottom: 4px;
    opacity: 0.85;
}

/* PR表記 (ステマ規制対応) */
footer {
    text-align: center;
    padding: 60px 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 80px;
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-disclaimer {
    font-size: 0.75rem;
    line-height: 1.6;
    margin: 20px 0;
    opacity: 0.7;
}

.footer-affiliate {
    font-size: 0.7rem;
    margin-bottom: 25px;
    opacity: 0.6;
}

.rakuten-credit-wrapper {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.rakuten-credit-wrapper a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.8rem;
}

.rakuten-credit-wrapper a:hover {
    color: var(--accent-color-1);
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* PR表記 (ステマ規制対応) */
.ad-disclosure {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--text-color);
    opacity: 0.5;
    padding: 2px 8px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.ad-disclosure:hover {
    opacity: 0.8;
}

/* 共通ナビゲーション（戻るボタン） */
.global-nav {
    display: flex;
    justify-content: center;
    padding: 0 0 40px; /* 上の余白はコンテナ側で調整されるため下のみ */
}

.back-link {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: var(--transition);
    opacity: 0.7;
}

.back-link:hover {
    opacity: 1;
    color: var(--accent-color-1);
    text-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

/* 横並びハーフグリッド */
.grid-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.card-small {
    padding: 20px 15px !important;
    text-align: center;
}

.btn-mini {
    padding: 8px 15px !important;
    font-size: 0.75rem !important;
    border-radius: 10px !important;
    margin-top: 5px !important;
}
