@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;700;900&family=Shippori+Mincho:wght@400;700;800&display=swap');

:root {
    --primary: #2c6e49;          /* 深い草の緑 */
    --secondary: #f4a261;        /* あたたかい夕陽色 */
    --accent: #e76f51;           /* 錆びたオレンジ */
    --yellow: #ffd166;           /* やわらかい黄色 */
    --sand: #e9c46a;             /* 砂色 */
    --bg-dark: #1a1a2e;
    --bg-mid: #16213e;
    --bg-light: #0f3460;
    --bg-grad: linear-gradient(160deg, #0d1117 0%, #1a1f2e 30%, #0f1923 60%, #0a1628 100%);
    --text-main: #f0ead6;
    --text-soft: #c9bfa8;
    --card-bg: rgba(15, 25, 35, 0.88);
    --card-border: rgba(244, 162, 97, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    background: var(--bg-grad);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    /* 夜空のような微細なノイズテクスチャ感 */
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(44, 110, 73, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(244, 162, 97, 0.08) 0%, transparent 50%),
        linear-gradient(160deg, #0d1117 0%, #1a1f2e 30%, #0f1923 60%, #0a1628 100%);
}

/* PCでは500px、スマホでは全幅 */
.app-wrap {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    background: transparent;
    position: relative;
    padding-bottom: 50px;
    border-left: 1px solid rgba(244, 162, 97, 0.12);
    border-right: 1px solid rgba(244, 162, 97, 0.12);
}

/* ─── ヘッダー ─── */
header {
    background: linear-gradient(90deg,
        #060e07 0%,
        #0f2218 25%,
        #193d28 50%,
        #0f2218 75%,
        #060e07 100%
    );
    color: var(--secondary);
    text-align: center;
    padding: 16px 15px;
    font-family: 'Shippori Mincho', serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 5px;
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 2px 24px rgba(244, 162, 97, 0.25);
    text-shadow:
        0 0 10px rgba(244, 162, 97, 0.8),
        0 0 25px rgba(244, 162, 97, 0.4);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '🐾';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.7;
}

header::after {
    content: '🐾';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    font-size: 1.2rem;
    opacity: 0.7;
}

/* ─── スクリーン共通 ─── */
.screen { display: none; animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.screen.active { display: block; }

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

/* ─── 画像（左右いっぱいに広がる） ─── */
.full-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* ─── コンテンツ余白エリア ─── */
.content-pad {
    padding: 28px 20px;
}

/* ─── ガラスカード ─── */
.glass-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid var(--card-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(44, 110, 73, 0.06),
        inset 0 1px 0 rgba(244, 162, 97, 0.12);
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
    line-height: 2.0;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

/* 肉球の装飾 */
.glass-card::before {
    content: '🐾';
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 1rem;
    opacity: 0.35;
}
.glass-card::after {
    content: '🐾';
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 1rem;
    opacity: 0.35;
    transform: rotate(180deg);
}

/* ─── ボタン共通 ─── */
.btn {
    display: block;
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
    border: none;
    box-sizing: border-box;
    letter-spacing: 2px;
}
.btn:active { transform: scale(0.96); }

/* メインボタン（草の緑＋夕陽アクセント） */
.btn-main {
    background: linear-gradient(135deg, #1e5235 0%, #2c6e49 50%, #1e5235 100%);
    color: var(--secondary);
    box-shadow:
        0 6px 22px rgba(44, 110, 73, 0.5),
        inset 0 1px 0 rgba(244, 162, 97, 0.3);
    border: 1px solid rgba(244, 162, 97, 0.45);
}

/* LINEボタン */
.btn-line {
    padding: 18px;
    width: 100%;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
    background: #06C755;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(6, 199, 85, 0.35);
    transition: all 0.2s ease-out;
}
.btn-line:active {
    transform: translateY(3px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* アウトラインボタン */
.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--secondary);
    letter-spacing: 2px;
}

@media (hover: hover) {
    .btn-main:hover {
        background: linear-gradient(135deg, #2c6e49 0%, #3a8f5e 50%, #2c6e49 100%);
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(44, 110, 73, 0.55);
    }
    .btn-line:hover { background: #05b34c; }
    .option-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 22px rgba(244, 162, 97, 0.2);
        border-color: rgba(244, 162, 97, 0.6);
        background: rgba(44, 110, 73, 0.25);
    }
    .btn-outline:hover {
        background: rgba(244, 162, 97, 0.08);
        transform: translateY(-1px);
    }
}

/* ─── 質問画面 ─── */

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid rgba(244, 162, 97, 0.18);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2c6e49, #f4a261);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(244, 162, 97, 0.5);
}

/* Q番号 */
.q-num {
    display: inline-block;
    background: rgba(44, 110, 73, 0.2);
    color: var(--secondary);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    font-weight: 700;
    border: 1px solid rgba(244, 162, 97, 0.38);
    letter-spacing: 2px;
}

/* 質問テキスト */
.q-text {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 26px;
    line-height: 1.8;
    color: var(--text-main);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* 選択肢エリア */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 選択肢ボタン */
.option-btn {
    background: var(--card-bg);
    border: 1px solid rgba(244, 162, 97, 0.22);
    padding: 17px 20px;
    border-radius: 10px;
    font-size: 1.0rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    font-family: inherit;
    color: var(--text-main);
    position: relative;
    padding-left: 44px;
}

/* 肉球アイコン（疑似要素） */
.option-btn::before {
    content: '🐾';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.5;
}

.option-btn:active {
    background: rgba(44, 110, 73, 0.4);
    color: var(--secondary);
    transform: scale(0.98);
    border-color: var(--secondary);
}

/* ─── 結果画面 ─── */
.result-header {
    text-align: center;
    padding: 38px 20px 22px;
    background: linear-gradient(180deg, rgba(44, 110, 73, 0.15) 0%, transparent 100%);
}

.result-rank {
    display: inline-block;
    background: linear-gradient(135deg, #1e5235, #2c6e49);
    color: var(--secondary);
    padding: 6px 26px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
    border: 1px solid rgba(244, 162, 97, 0.5);
    letter-spacing: 3px;
    box-shadow: 0 4px 16px rgba(44, 110, 73, 0.4);
}

.result-title {
    font-family: 'Shippori Mincho', serif;
    font-size: 2.6rem;
    color: var(--secondary);
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.2;
    text-shadow:
        0 0 20px rgba(244, 162, 97, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 4px;
}

.result-desc {
    text-align: left;
    font-size: 1.08rem;
    color: var(--text-soft);
    line-height: 2.0;
}

/* ─── おすすめエリア ─── */
.recommend-area {
    background: rgba(15, 25, 35, 0.7);
    border: 1px solid rgba(244, 162, 97, 0.22);
    border-radius: 10px;
    padding: 24px 20px;
    margin-bottom: 28px;
    text-align: center;
    margin-top: 28px;
}
.recommend-title {
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: var(--secondary);
    letter-spacing: 3px;
}
.rounded-img {
    border-radius: 8px;
    margin-bottom: 14px;
}

/* ─── ユーティリティ ─── */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.ad-space { text-align: center; }

/* ─── ローディング画面 ─── */
.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 100vh;
}

.loading-text {
    text-align: center;
    position: relative;
    color: var(--secondary);
    font-family: 'Shippori Mincho', serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-shadow:
        0 0 6px rgba(244, 162, 97, 0.9),
        0 0 18px rgba(244, 162, 97, 0.6),
        0 0 35px rgba(244, 162, 97, 0.3);
}

/* ローディングアニメーション（猫の肉球マーク） */
.loading-text::after {
    content: '🐾';
    position: static;
    display: block;
    font-size: 10rem;
    opacity: 0.55;
    filter: drop-shadow(0 0 20px rgba(244, 162, 97, 0.45));
    animation: pawbeat 1.5s infinite ease-in-out;
}

@keyframes pawbeat {
    0%   { transform: scale(1)    rotate(-5deg); }
    15%  { transform: scale(1.22) rotate(0deg); }
    30%  { transform: scale(1.05) rotate(-3deg); }
    45%  { transform: scale(1.32) rotate(3deg); }
    60%  { transform: scale(1)    rotate(-5deg); }
    100% { transform: scale(1)    rotate(-5deg); }
}
