/* =========================================================================
 * marker-style.css 【動的干渉バグ完全クレンジング版】
 * ========================================================================= */

/* 1. 全環境共通の基本設定 */
.editor-styles-wrapper .c-format-base,
.wp-block-paragraph .c-format-base,
.c-format-base {
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: inherit !important;
    text-decoration: none !important;
}

/* 2. ✍️ 手書き風マーカー専用：位置のベースと傾きのみを定義（背景色や幅はPHP側に譲渡） */
.editor-styles-wrapper .c-lp-marker-grunge,
.c-lp-marker-grunge {
    position: relative !important;
    display: inline !important;
    background: none !important;
}

/* 🛠️ 重複していたbackground指定とwidth指定を完全消滅させ、PHPの動的CSSを100%通します */
.editor-styles-wrapper .c-lp-marker-grunge:after,
.c-lp-marker-grunge:after,
.editor-styles-wrapper .c-is-visible:after,
.c-is-visible:after {
    content: '' !important;
    position: absolute !important;
    z-index: -1 !important;
    transform-origin: left bottom !important;
}

/* 3. 🧱 1文字タイル囲み */
.editor-styles-wrapper .c-lp-tile-badge,
.wp-block-paragraph .c-lp-tile-badge,
.c-lp-tile-badge {
    display: inline-block !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    text-align: center !important;
    font-weight: bold !important;
    color: #ffffff !important;
    background-color: var(--lp-badge-color, #e53e3e) !important;
    width: 1.25em !important;
    height: 1.25em !important;
    line-height: 1.25em !important;
    margin: 0 3px !important;
    padding: 0 !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
    border: none !important;
}

/* 4. 💥 ぷるぷる微振動エフェクト */
.c-format-base.c-lp-vibe-text,
.c-lp-vibe-text {
    display: inline-block !important;
    transform-origin: center center !important;
}
.editor-styles-wrapper .c-lp-vibe-text,
body .c-lp-vibe-text:hover {
    animation: c-lp-vibe-ani 0.5s linear infinite !important;
}

/* 5. ポップオーバー（ツールバー内）調整 */
.components-popover.custom-ruby-popover-container,
.components-popover.custom-ruby-popover { z-index: 999999 !important; }
.c-menu-popover-inner { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.components-popover__content .c-marker-text-btn.components-button { width: 100% !important; justify-content: flex-start !important; padding: 6px 12px !important; height: auto !important; font-size: 13px !important; font-weight: 500 !important; border: 1px solid #e0e0e0 !important; border-radius: 4px !important; color: #333 !important; background: #fff !important; }
