:root {
    /* メインカラー定義 */
    --brand-primary: #14b3e3;
    --brand-primary-rgb: 20, 179, 227; /* シャドウの透明度指定などに使用 */
    --brand-primary-marker: #b3e5fc;   /* マーカー用の薄い色 */
    --brand-bg: #FAFAFA;
    --brand-text: #333333;
    --brand-body: #4B5563;
    --brand-gray: #F9F9F9;
}

body {
    font-family: "Yu Gothic", "YuGothic", "游ゴシック", "游ゴシック体", "Noto Sans JP", sans-serif;
    background-color: var(--brand-bg);
    color: var(--brand-text);
    /* Global loose settings for "Yutori" */
    line-height: 2.0; 
    letter-spacing: 0.05em;
}

/* Subtle paper texture */
.paper-texture {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hand-drawn underline for headings */
.underline-marker {
    background-image: linear-gradient(120deg, var(--brand-primary-marker) 0%, var(--brand-primary-marker) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.3em; /* Thinner line */
    background-position: 0 90%;
}

/* フォームの入力欄のフォーカス時のスタイル */
.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

/* Pencil sketch border effect - more subtle */
.sketch-box {
    border: 1px solid #e5e7eb;
    box-shadow: 2px 2px 0px 0px #e5e7eb;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.sketch-box:hover {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0px 0px var(--brand-primary); /* Sky Blue shadow on hover */
    border-color: var(--brand-primary);
}

/* Typography utility */
h1, h2, h3, h4 {
    line-height: 1.6;
    letter-spacing: 0.08em;
}

/* Ensure text contrast for accessibility */
p {
    color: var(--brand-body); /* Gray 600 - Good contrast against white */
}

/* 背景画像のパンアニメーション（上下にゆっくり動かす） */
.bg-pan-slow {
    background-position: center top;
    animation: pan-vertical 40s ease-in-out infinite alternate;
}

@keyframes pan-vertical {
    0% { background-position: center top; }
    100% { background-position: center bottom; }
}

/* recipe */
/* ステップ間の縦線 */
.step-line::before {
    content: '';
    position: absolute;
    top: 3rem;
    bottom: -3rem;
    left: 1.5rem; /* 丸アイコンの中心に合わせる */
    width: 2px;
    background-color: #E5E7EB; /* gray-200 */
    z-index: 0;
}
.step-item:last-child .step-line::before {
    display: none; /* 最後のステップは線を消す */
}

/* ステップナンバーのアニメーション */
.step-number {
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 画面内に入った（activeクラスがついた）時の色 */
.step-item.active .step-number {
    background-color: var(--brand-primary) !important;
}
/* スクロールアニメーション用のスタイル */
.reveal {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* メインビジュアルのスライドショー用スタイル */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out, transform 10s linear;
    transform: scale(1);
}
.hero-bg.active {
    opacity: 1;
    transform: scale(1.05);
}

/* オパールの遊色（Opal Color）アニメーション */
@keyframes opal-shift {
        0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* 共通のグラデーション定義（色の濃度を統一） */
:root {
    --opal-gradient: linear-gradient(135deg, #dcedc8 0%, #b3e5fc 30%, #81d4fa 70%, #fce4ec 80%, #fce4ec 100%);
}
.opal-bg {
    background: var(--opal-gradient);
    background-size: 300vw 300vh;
    animation: opal-shift 15s ease infinite;
    background-attachment: fixed;
}

/* ★修正：マーカー風の下線にする */
.opal-underline {
    background-image: var(--opal-gradient);
    /* 高さを40%にしてマーカーのような太さに制限 */
    background-size: 300vw 40%; 
    background-repeat: no-repeat;
    display: inline;
    /* 下線専用のアニメーションを適用 */
    animation: opal-shift-underline 15s ease infinite;
}

/* 通常の背景用アニメーション */
@keyframes opal-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ★新規追加：下線用アニメーション（Y座標を100%の下端に固定） */
@keyframes opal-shift-underline {
    0% { background-position: 0% 100%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 100%; }
}

/* カード枠線用の薄い（半透明な）オパールグラデーション */
.opal-border-bg {
/* ... existing code ... */

/* カードのアニメーション（斜めを無くして浮き上がるだけに） */
.scrap-card, .recipe-card {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.scrap-card:hover {
    transform: translateY(-5px) scale(1.01) !important;
    z-index: 10;
}
