/* ==========================================
   上書きここから（Wiki全体設定）
   ========================================== */
body {
    font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

#wikibody h2 {
    font-size: 23px;
    margin-left: 0px;
    padding: 10px 10px;
    border-bottom: 3px solid #333 !important;
}

#wikibody h3 {
    margin-top: 1.5em;
    margin-bottom: 10px;
    border: none !important; 
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 1.1em;
}

/* ==========================================
   カードテンプレここから
   ========================================== */

/* カード名 */
.y_name {
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    padding: 8px 20px;
    background-color: #f0f2f5;
    border-left: 6px solid #032433;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* --- タイトル系共通 --- */
.y_n_title, .y_e_title, .y_f_title, .y_r_title, .y_s_title, 
.y_ds_title, .y_x_title, .y_l_title, .y_to_title, .y_m_title, .y_t_title,
.y_p_title, .y_xp_title, .y_sp_title, .y_fp_title {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 15px;
    border: none !important;
    border-radius: 4px;
    position: relative;
    overflow: hidden; /* タイトルはこれでOK */
}

/* 通常タイトル */
.y_n_title { border-left: 8px solid #B29234 !important; background: #faf8f0; }
.y_e_title { border-left: 8px solid #B5410D !important; background: #fff8f4; }
.y_f_title { border-left: 8px solid #7F3B98 !important; background: #fbf7ff; }
.y_r_title { border-left: 8px solid #4963A6 !important; background: #f5f8ff; }
.y_s_title { border-left: 8px solid #DED6D3 !important; background: #f9f9f9; }
.y_x_title { border-left: 8px solid #032433 !important; background: #f0f2f5; }
.y_l_title { border-left: 8px solid #0483C6 !important; background: #f0f9ff; }
.y_m_title { border-left: 8px solid #16784E !important; background: #f5fff9; }
.y_t_title { border-left: 8px solid #A42F73 !important; background: #fff5fa; }
.y_to_title{ border-left: 8px solid #897870 !important; background: #f9f9f9; }

/* Pタイトル：角丸＋左線・背景グラデ */
.y_p_title, .y_xp_title, .y_sp_title, .y_fp_title { padding-left: 20px; }
.y_p_title::after, .y_xp_title::after, .y_sp_title::after, .y_fp_title::after {
    content: ""; position: absolute; top: 0; left: 0; width: 8px; height: 100%;
}
.y_p_title { background: linear-gradient(to bottom, #fff8f4, #f5fff9) !important; }
.y_p_title::after { background: linear-gradient(to bottom, #B5410D, #16784E); }
.y_xp_title { background: linear-gradient(to bottom, #f0f2f5, #f5fff9) !important; }
.y_xp_title::after { background: linear-gradient(to bottom, #032433, #16784E); }
.y_sp_title { background: linear-gradient(to bottom, #f9f9f9, #f5fff9) !important; }
.y_sp_title::after { background: linear-gradient(to bottom, #DED6D3, #16784E); }
.y_fp_title { background: linear-gradient(to bottom, #fbf7ff, #f5fff9) !important; }
.y_fp_title::after { background: linear-gradient(to bottom, #7F3B98, #16784E); }

/* --- テキスト系共通 --- */
.y_n_text, .y_e_text, .y_f_text, .y_r_text, .y_s_text, 
.y_ds_text, .y_x_text, .y_l_text, .y_to_text, .y_m_text, .y_t_text,
.y_p_text, .y_xp_text, .y_sp_text, .y_fp_text {
    position: relative;
    margin: 30px 4px 15px 4px;
    padding: 1.8em 1.2em 1.2em !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    /* overflow: hidden; はラベル消滅の原因なので削除 */
}

/* 擬似ラベル共通 */
.y_n_text::before, .y_e_text::before, .y_f_text::before, .y_r_text::before,
.y_s_text::before, .y_ds_text::before, .y_x_text::before, .y_l_text::before,
.y_to_text::before, .y_m_text::before, .y_t_text::before,
.y_p_text::before, .y_xp_text::before, .y_sp_text::before, .y_fp_text::before {
    position: absolute;
    top: -24px; left: -1px; padding: 2px 14px; font-size: 10px; font-weight: bold;
    color: #fff !important; border-radius: 6px 6px 0 0; letter-spacing: 0.1em; z-index: 3;
}

/* 通常カード：単色背景 */
.y_n_text { border-left: 8px solid #B29234 !important; background-color: #faf8f0 !important; } 
.y_n_text::before { content: "NORMAL"; background: #B29234; }
.y_e_text { border-left: 8px solid #B5410D !important; background-color: #fff8f4 !important; } 
.y_e_text::before { content: "EFFECT"; background: #B5410D; }
.y_f_text { border-left: 8px solid #7F3B98 !important; background-color: #fbf7ff !important; } 
.y_f_text::before { content: "FUSION"; background: #7F3B98; }
.y_r_text { border-left: 8px solid #4963A6 !important; background-color: #f5f8ff !important; } 
.y_r_text::before { content: "RITUAL"; background: #4963A6; }
.y_s_text { border-left: 8px solid #DED6D3 !important; background-color: #f9f9f9 !important; } 
.y_s_text::before { content: "SYNCHRO"; background: #888; }
.y_x_text { border-left: 8px solid #032433 !important; background-color: #f0f2f5 !important; } 
.y_x_text::before { content: "XYZ"; background: #032433; }
.y_l_text { border-left: 8px solid #0483C6 !important; background-color: #f0f9ff !important; } 
.y_l_text::before { content: "LINK"; background: #0483C6; }
.y_m_text { border-left: 8px solid #16784E !important; background-color: #f5fff9 !important; } 
.y_m_text::before { content: "SPELL"; background: #16784E; }
.y_t_text { border-left: 8px solid #A42F73 !important; background-color: #fff5fa !important; } 
.y_t_text::before { content: "TRAP"; background: #A42F73; }

/* ペンデュラム系：ラベルを表示しつつ左線のみ角丸グラデ */
.y_p_text, .y_xp_text, .y_sp_text, .y_fp_text { border-left: none !important; padding-left: 20px !important; }
.y_p_text::after, .y_xp_text::after, .y_sp_text::after, .y_fp_text::after {
    content: ""; position: absolute; top: 0; left: 0; width: 8px; height: 100%; z-index: 2;
    border-radius: 0 0 0 8px; /* 左下だけ丸くして本体の角丸に合わせる */
}

.y_p_text  { background: linear-gradient(to bottom, #fff8f4 0%, #f5fff9 100%) !important; }
.y_p_text::after  { background: linear-gradient(to bottom, #B5410D, #16784E); }
.y_p_text::before { content: "PENDULUM"; background: #B5410D; }

.y_xp_text { background: linear-gradient(to bottom, #f0f2f5 0%, #f5fff9 100%) !important; }
.y_xp_text::after { background: linear-gradient(to bottom, #032433, #16784E); }
.y_xp_text::before { content: "XYZ PENDULUM"; background: #032433; }

.y_sp_text { background: linear-gradient(to bottom, #f9f9f9 0%, #f5fff9 100%) !important; }
.y_sp_text::after { background: linear-gradient(to bottom, #DED6D3, #16784E); }
.y_sp_text::before { content: "SYNCHRO PENDULUM"; background: #888; }

.y_fp_text { background: linear-gradient(to bottom, #fbf7ff 0%, #f5fff9 100%) !important; }
.y_fp_text::after { background: linear-gradient(to bottom, #7F3B98, #16784E); }
.y_fp_text::before { content: "FUSION PENDULUM"; background: #7F3B98; }

/* 内側の余計な装飾をリセット */
.y_p_text div, .y_xp_text div, .y_sp_text div, .y_fp_text div {
    background: transparent !important; margin: 0 !important; padding: 0 !important; border: none !important;
}

/* --- Amazoo調整 --- */
.amazoo_tool_area {
    background-color: #ffffff; border: 1px solid #eee; border-radius: 8px; padding: 10px;
}