/* =========================================================
   🌈 1. PC 共通（ログイン / PWリセット）
========================================================= */

.cg-login-page {
    background: linear-gradient(to right, #bcd0ea 0%, #ffffff 40%, #ffffff 60%, #bcd0ea 100%);
    min-height: 100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:40px 20px;
}

.cg-login-wrap {
    width: 100%;
    display:flex;
    justify-content:center;
    align-items:center;
}

.cg-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 40px 36px;
    border-radius: 16px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.cg-login-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align:left;
}

.cg-login-desc {
    color: #555;
    font-size: 14px;
    margin-bottom: 28px;
    text-align:left;
}

.cg-login-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ccd3e0;
    margin-bottom: 18px;
    background: #fafbfd;
    font-size: 14px;
    box-sizing:border-box;
}

.cg-login-btn {
    width: 100%;
    background: #f57c00;
    color: #fff;
    font-size: 16px;
    padding: 14px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.cg-login-btn:hover {
    background: #fb8c00;
}

.cg-forgot {
    text-align:center;
    margin-top: 18px;
}

.cg-forgot a {
    color:#1a3d8f;
    font-size:14px;
    text-decoration:underline;
}

/* =========================================================
   🏠 2. マイページ（PC）
========================================================= */

.cg-mypage-area {
    max-width: 1080px;
    margin: 60px auto 100px;
    padding: 40px 40px 80px;
    background: #f4f5ff;
    border-radius: 20px;
}

.cg-mypage-header {
    display:flex;
    justify-content: space-between;
    align-items:flex-start;
    margin-bottom:40px;
}

.cg-user-name {
    font-size:30px;
    font-weight:700;
    margin-bottom:6px;
}

.cg-user-desc {
    color:#666;
}

.cg-rank-badge {
    background:#e6eaff;
    padding:10px 18px;
    border-radius:12px;
    font-size:14px;
    font-weight:600;
    color:#333;
    box-shadow:0 2px 4px rgba(0,0,0,0.05);
}

/* ▼ カード4つの高さを揃える */
.cg-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:36px;
    align-items:stretch;
}

.cg-card {
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    background:#fff;
    padding:28px 32px;
    border-radius:16px;
    text-decoration:none;
    color:#222;
    box-shadow:0 4px 18px rgba(0,0,0,0.06);
    transition:0.25s;
    height:100%;
}

.cg-card:hover {
    transform:translateY(-3px);
    box-shadow:0 6px 20px rgba(0,0,0,0.10);
}

.cg-card h3 {
    font-size:20px;
    font-weight:700;
    margin-bottom:14px;
    line-height:1.4;
}

.cg-card p {
    font-size:14px;
    color:#555;
    line-height:1.6;
    margin-bottom:0;
}

/* =========================================================
   📱 3. スマホ最適化
========================================================= */
@media (max-width: 768px) {

    .cg-mypage-area {
        padding: 30px 20px 60px;
        border-radius: 14px;
        margin: 40px 10px 80px;
    }

    .cg-grid {
        grid-template-columns: 1fr !important;
        gap: 22px;
    }

    .cg-card {
        padding: 22px 24px;
        border-radius: 12px;
    }

    .cg-card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
}

/* =========================================================
   🧩 4. アフィリエイトフォーム統一デザイン
========================================================= */

.cg-aff-box {
    margin-top: 10px !important;
}

.cg-aff-label {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.cg-aff-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cg-aff-btn {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    font-size: 15px;
    border-radius: 8px;
}

/* ★★★ 太字＋中央寄せが確実に反映される完全版 ★★★ */
.cg-aff-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    text-align: center;
    width: 100%;
    display: block;
    font-weight: 600;   /* ←これで太字が確実に反映 */
}
/* ▼ 検索フォームが表示されない問題の強制修正 */
.cg-aff-box {
    position: relative !important;
}

.cg-aff-search {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    z-index: 9999 !important;
}

.cg-aff-search input {
    background: #ffffff !important;
    border: 2px solid #2563eb !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    width: 150px !important;
}
/* =========================================================
   Core Gateway 固定ログアウトボタン
   形状：ページ内ボタンと統一
   意味：学習・作業セッションの終了
========================================================= */
.cg-logout-float{
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
}

.cg-logout-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #334155;     /* ディープブルーグレー */
    color: #ffffff;

    padding: 10px 20px;
    border-radius: 6px;      /* ← copy-btn と統一 */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.15s ease;
}

.cg-logout-btn:hover{
    background: #475569;     /* 少し明るく */
    transform: translateY(-1px);
    opacity: 0.96;
}

@media (max-width: 768px){
    .cg-logout-float{
        right: 12px;
        bottom: 12px;
    }
    .cg-logout-btn{
        font-size: 13px;
        padding: 9px 16px;
    }
}