/**
 * アプリーチ完全スタンドアロンCSS
 * WordPress追加CSS不要 - すべてのスタイルを含む
 */

/* ========================================
   通常のアプリーチ表示（関連コンテンツ外）
======================================== */
.appreach {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: left;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.appreach:after {
    content: "";
    display: block;
    clear: both;
}

.appreach a {
    text-decoration: none;
    color: inherit;
}

.appreach a:hover {
    opacity: 0.8;
}

.appreach p {
    margin: 0;
    padding: 0;
}

/* アプリアイコン */
.appreachicon {
    float: left;
    width: 100px;
    height: 100px;
    margin: 0 20px 20px 0;
    border-radius: 22.5%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.16);
    overflow: hidden;
}

.appreachicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* アプリ詳細エリア */
.appreachdetail {
    overflow: hidden;
}

/* アプリ名 */
.appreachname {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 開発者情報 */
.appreachinfo {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.appreachdevelopper {
    display: inline-block;
    margin-right: 10px;
}

.appreachprice {
    display: inline-block;
    color: #0a84ff;
    font-weight: 500;
}

/* 星評価 */
.appreachstar {
    position: relative;
    display: inline-block;
    font-size: 16px;
    height: 16px;
    line-height: 1;
    margin-bottom: 15px;
}

.appreachstar__base {
    color: #ddd;
}

.appreachstar__evaluate {
    position: absolute;
    left: 0;
    top: 0;
    color: #ffb400;
    overflow: hidden;
    white-space: nowrap;
}

/* ダウンロードボタンエリア */
.appreachlinks {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.appreachaslink,
.appreachgplink {
    display: inline-block;
    flex: 0 0 auto;
}

.appreachaslink img,
.appreachgplink img {
    height: 45px;
    width: auto;
    max-width: 152px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.appreachaslink:hover img,
.appreachgplink:hover img {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 480px) {
    .appreach {
        padding: 15px;
    }
    
    .appreachicon {
        width: 80px;
        height: 80px;
        margin: 0 15px 15px 0;
    }
    
    .appreachname {
        font-size: 18px;
    }
    
    .appreachinfo {
        font-size: 13px;
    }
    
    .appreachlinks {
        gap: 8px;
    }
    
    .appreachaslink img,
    .appreachgplink img {
        height: 40px;
    }
}

/* ========================================
   関連コンテンツ内での表示調整
======================================== */
.fp-next-card .appreach {
    margin: 0;
    padding: 0;
    max-width: none;
    border: none;
    box-shadow: none;
    background: transparent;
}

.fp-next-card .appreachicon {
    width: 60px;
    height: 60px;
    margin: 0 12px 12px 0;
}

.fp-next-card .appreachname {
    font-size: 15px;
    margin-bottom: 6px;
}

.fp-next-card .appreachinfo {
    font-size: 12px;
    margin-bottom: 6px;
}

.fp-next-card .appreachstar {
    font-size: 14px;
    margin-bottom: 10px;
}

.fp-next-card .appreachlinks {
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.fp-next-card .appreachaslink img,
.fp-next-card .appreachgplink img {
    height: 32px;
    max-width: 120px;
}

/* ========================================
   ダークモード対応（オプション）
======================================== */
@media (prefers-color-scheme: dark) {
    .appreach {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
    
    .appreachname {
        color: #fff;
    }
    
    .appreachinfo {
        color: #aaa;
    }
    
    .appreachstar__base {
        color: #444;
    }
}

/* ========================================
   星評価非表示オプション
======================================== */
.appreach-no-star .appreachstar,
.appreach-no-star .appreachstar__base,
.appreach-no-star .appreachstar__evaluate {
    display: none !important;
}

/* ========================================
   アクセシビリティ
======================================== */
.appreach:focus-within {
    outline: 3px solid #0a84ff;
    outline-offset: 2px;
}

.appreachaslink:focus,
.appreachgplink:focus {
    outline: 2px solid #0a84ff;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ========================================
   印刷対応
======================================== */
@media print {
    .appreach {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .appreachlinks {
        display: none;
    }
}