/* ==============================
   THE MARIO GAME - チャプター0
   ============================== */

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

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --gold: #ffd93d;
    --gold-glow: rgba(255, 217, 61, 0.5);
    --red: #ff6b6b;
    --green: #4caf50;
    --purple: #764ba2;
    --blue: #4d96ff;
    --cyan: #64dfdf;
    --text-primary: #ffffff;
    --text-secondary: #aaa;
    --text-muted: #666;
    --sidebar-width: 260px;
    --nav-height: 65px;
    --border-radius: 12px;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
}

.game-container {
    height: 100vh;
    height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    overflow: hidden;
}

/* ==============================
   HEADER / ヘッダー
   ============================== */

.game-header {
    flex-shrink: 0;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.game-header h1 {
    font-size: 1.6rem;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chapter-badge {
    font-size: 0.8rem;
    background: rgba(100, 223, 223, 0.15);
    color: var(--cyan);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(100, 223, 223, 0.3);
    white-space: nowrap;
}

/* チャプタープログレスバー */
.chapter-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.chapter-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.chapter-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--red));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.chapter-progress-text {
    font-size: 0.8rem;
    color: var(--gold);
    min-width: 40px;
    text-align: right;
    font-weight: bold;
}

/* ステータス */
.stats {
    display: flex;
    gap: 8px;
}

.stat-item {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ==============================
   DESKTOP 3-COLUMN LAYOUT
   ============================== */

.desktop-layout {
    flex: 1;
    display: flex;
    gap: 16px;
    padding: 16px 0;
    overflow: hidden;
    min-height: 0;
}

/* ===== サイドバー（両側） ===== */

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,217,61,0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,217,61,0.3);
    border-radius: 2px;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section h3 {
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 217, 61, 0.15);
}

/* プレイヤーカード */
.player-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold), #ff8c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: bold;
    font-size: 1rem;
}

.player-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ステータス一覧 */
.stat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-row-value {
    font-weight: bold;
    color: var(--text-primary);
}

/* 目標リスト */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.goal-item.completed {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.goal-item .goal-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.goal-item .goal-text {
    flex: 1;
    color: var(--text-secondary);
}

.goal-item.completed .goal-text {
    color: var(--text-primary);
    text-decoration: line-through;
    text-decoration-color: var(--green);
}

.goal-item .goal-check {
    font-size: 0.8rem;
    color: var(--green);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.goal-item.completed .goal-check {
    opacity: 1;
}

/* ===== メインエリア ===== */

.game-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.clicker-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

.mario-container {
    position: relative;
    cursor: pointer;
    transition: transform 0.1s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mario-container:hover {
    transform: scale(1.05);
}

.mario-container:active {
    transform: scale(0.93);
}

.mario-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--gold);
    box-shadow: 0 0 40px var(--gold-glow), 0 0 80px rgba(255, 217, 61, 0.2);
    transition: all 0.3s ease;
    pointer-events: none;
}

.mario-img:hover {
    box-shadow: 0 0 60px var(--gold-glow), 0 0 120px rgba(255, 217, 61, 0.3);
}

.click-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.floating-coin {
    position: absolute;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.8);
    animation: floatUp 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -80px) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -130px) scale(0.8); }
}

.click-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* コンボ表示 */
.click-combo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 20px;
}

.combo-label {
    font-size: 0.7rem;
    color: var(--red);
    font-weight: bold;
    letter-spacing: 2px;
}

.combo-count {
    font-size: 1.1rem;
    color: var(--red);
    font-weight: bold;
}

/* ===== 右サイドバー: ショップ ===== */

.sidebar-right .sidebar-section {
    background: var(--bg-card);
}

.upgrade-category {
    margin-bottom: 14px;
}

.upgrade-category h4 {
    font-size: 0.8rem;
    color: var(--red);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
}

.upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upgrade-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    gap: 8px;
}

.upgrade-item:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 217, 61, 0.2);
}

.upgrade-item.purchased {
    opacity: 0.5;
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.upgrade-item.can-afford {
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(255, 217, 61, 0.2);
}

.upgrade-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.upgrade-name {
    font-weight: bold;
    font-size: 0.85rem;
}

.upgrade-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.upgrade-cost {
    font-size: 0.8rem;
    color: var(--gold);
}

.upgrade-btn {
    background: linear-gradient(135deg, #667eea 0%, var(--purple) 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, var(--purple) 0%, #667eea 100%);
    transform: scale(1.05);
}

.upgrade-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
}

/* ===== 黒い石 ===== */

.black-stone-category {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px solid rgba(100, 223, 223, 0.2);
}

.black-stone-item {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 0, 40, 0.9), rgba(0, 0, 0, 0.9));
    border: 2px solid rgba(100, 223, 223, 0.4);
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: default;
}

.black-stone-item:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(100, 223, 223, 0.15);
}

.black-stone-item.can-afford {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(100, 223, 223, 0.3);
}

.black-stone-item.purchased {
    opacity: 0.6;
    border-color: var(--green);
    background: rgba(76, 175, 80, 0.1);
    box-shadow: none;
}

.black-stone-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(100, 223, 223, 0.08) 0%, transparent 70%);
    animation: stone-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes stone-pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

.black-stone-icon {
    font-size: 3rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(100, 223, 223, 0.5));
}

.black-stone-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.black-stone-name {
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.black-stone-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.black-stone-cost {
    font-size: 1rem;
    color: var(--gold);
    font-weight: bold;
}

.stone-btn {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.stone-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(100, 223, 223, 0.3);
}

.stone-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==============================
   MOBILE NAV / ボトムナビ
   ============================== */

.mobile-nav {
    display: none;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn.active {
    color: var(--gold);
}

.nav-btn.active .nav-icon {
    transform: scale(1.1);
}

.nav-icon {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 600;
}

/* ==============================
   FOOTER / フッター
   ============================== */

.game-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.footer-btn {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-btn.danger {
    border-color: rgba(255, 107, 107, 0.4);
}

.footer-btn.danger:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: var(--red);
}

/* ==============================
   NOTIFICATION / 通知
   ============================== */

.notification {
    position: fixed;
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--gold);
    transform: translateY(-120px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    font-size: 0.9rem;
    text-align: center;
    pointer-events: none;
}

.notification.show {
    transform: translateY(0);
    pointer-events: auto;
}

/* ==============================
   CHAPTER COMPLETE OVERLAY
   ============================== */

.chapter-complete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: overlay-in 0.5s ease;
    padding: 20px;
}

@keyframes overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chapter-complete-content {
    background: linear-gradient(135deg, #1a0a2e, #0a0a1a);
    border: 2px solid rgba(100, 223, 223, 0.4);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: content-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

@keyframes content-pop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.complete-sparkle {
    font-size: 4rem;
    animation: sparkle-rotate 2s linear infinite;
    margin-bottom: 16px;
}

@keyframes sparkle-rotate {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.chapter-complete-content h2 {
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.complete-subtitle {
    font-size: 1rem;
    color: var(--cyan);
    margin-bottom: 24px;
}

.complete-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.complete-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.complete-stat span:last-child {
    color: var(--gold);
    font-weight: bold;
}

.complete-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.complete-btn {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.complete-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(100, 223, 223, 0.3);
}

/* ==============================
   PARTICLE EFFECTS
   ============================== */

.particle {
    position: fixed;
    pointer-events: none;
    animation: particle-float 0.8s ease-out forwards;
    z-index: 999;
}

@keyframes particle-float {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* ==============================
   SCROLLBAR
   ============================== */

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 217, 61, 0.2);
    border-radius: 2px;
}

/* ==============================
   RESPONSIVE: TABLET AND BELOW
   ============================== */

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
}

@media (max-width: 860px) {
    .desktop-layout {
        gap: 10px;
    }
    .sidebar {
        width: 200px;
    }
    .mario-img {
        width: 180px;
        height: 180px;
    }
    .game-header h1 {
        font-size: 1.3rem;
    }
}

/* ==============================
   RESPONSIVE: MOBILE (768px以下)
   ============================== */

@media (max-width: 768px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .game-container {
        padding: 0;
        height: 100vh;
        height: -webkit-fill-available;
    }

    /* ヘッダーをコンパクトに */
    .game-header {
        padding: 10px 12px;
        border-radius: 0;
    }

    .header-top {
        gap: 8px;
    }

    .game-header h1 {
        font-size: 1.1rem;
    }

    .chapter-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .chapter-progress-wrapper {
        margin-bottom: 8px;
    }

    .stats {
        gap: 4px;
    }

    .stat-item {
        padding: 4px 6px;
        border-radius: 6px;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    /* デスクトップレイアウト解除 → シミュレートしたタブ切り替え */
    .desktop-layout {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow: hidden;
    }

    /* デスクトップでは全部表示、モバイルではアクティブなタブだけ表示 */
    .sidebar {
        display: none;
        width: 100%;
        overflow-y: auto;
        padding: 12px;
        flex: 1;
    }

    .sidebar.mobile-active {
        display: flex;
    }

    .game-main {
        display: none;
        flex: 1;
        padding: 0;
        overflow-y: auto;
    }

    .game-main.mobile-active {
        display: flex;
    }

    .clicker-section {
        padding: 20px 12px;
    }

    .mario-img {
        width: 180px;
        height: 180px;
        border-width: 3px;
        box-shadow: 0 0 30px var(--gold-glow);
    }

    .click-hint {
        font-size: 0.8rem;
    }

    /* モバイルナビ表示 */
    .mobile-nav {
        display: flex;
    }

    /* フッター非表示（モバイルではボトムナビで操作） */
    .game-footer {
        display: none;
    }

    /* 黒い石 */
    .black-stone-item {
        padding: 16px;
    }

    .black-stone-icon {
        font-size: 2.5rem;
    }

    /* チャプター完了 */
    .chapter-complete-content {
        padding: 28px 20px;
    }

    .chapter-complete-content h2 {
        font-size: 1.4rem;
    }

    /* 通知 */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.85rem;
        padding: 12px 16px;
    }

    /* スクロールバー */
    .sidebar::-webkit-scrollbar,
    ::-webkit-scrollbar {
        width: 3px;
    }
}

/* ==============================
   RESPONSIVE: Small Mobile (400px以下)
   ============================== */

@media (max-width: 400px) {
    .game-header h1 {
        font-size: 0.95rem;
    }

    .chapter-badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    .stat-value {
        font-size: 0.8rem;
    }

    .mario-img {
        width: 150px;
        height: 150px;
    }

    .upgrade-item {
        padding: 8px;
    }

    .upgrade-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .nav-icon {
        font-size: 1.2rem;
    }

    .nav-label {
        font-size: 0.6rem;
    }
}

/* ==============================
   チャプター遷移アニメーション
   ============================== */

.chapter-transition {
    animation: chapterSlideIn 0.6s ease-out;
}

@keyframes chapterSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==============================
   紫の石 (Chapter 1)
   ============================== */

.purple-stone-item {
    position: relative;
    background: linear-gradient(135deg, rgba(40, 0, 60, 0.9), rgba(10, 0, 20, 0.9));
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: default;
}

.purple-stone-item:hover {
    border-color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.15);
}

.purple-stone-item.can-afford {
    border-color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
}

.purple-stone-item.purchased {
    opacity: 0.6;
    border-color: var(--green);
    background: rgba(76, 175, 80, 0.1);
    box-shadow: none;
}

.purple-stone-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    animation: stone-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

.purple-stone-icon {
    font-size: 3rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5));
}

.purple-stone-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.purple-stone-name {
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #a855f7, #64dfdf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.purple-stone-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.purple-stone-cost {
    font-size: 1rem;
    color: var(--gold);
    font-weight: bold;
}

/* Chapter 1モバイル微調整 */
@media (max-width: 768px) {
    .purple-stone-item {
        padding: 16px;
    }
    .purple-stone-icon {
        font-size: 2.5rem;
    }
}

/* ==============================
   UTILITY / 汎用
   ============================== */

.hidden {
    display: none !important;
}
