/* ==========================================================
   Yumineko LMS — スタイルシート
   ========================================================== */

/* --- 変数 -------------------------------------------------------- */
/* カラー: Figma デザイントークン (Primary/yumi-blue: #398CCF) に準拠 */
:root {
    --ym-primary:     #398CCF;
    --ym-primary-h:   #2a7ac0;
    --ym-danger:      #d94444;
    --ym-danger-h:    #b93333;
    --ym-border:      #e0e0e0;
    --ym-bg:          #f8f9fa;
    --ym-text:        #333;
    --ym-text-muted:  #999;
    --ym-radius:      8px;
    --ym-radius-pill: 100px;
    --ym-shadow:      0 2px 12px rgba(0, 0, 0, .15);
    --ym-transition:  .2s ease;
    --ym-font:        'YuGothic', 'Yu Gothic', sans-serif;
}

/* --- PMPro フォームフィールド: ラベル⇔入力間の gap リセット ------- */
.pmpro_form_field {
    gap: 0 !important;
}

/* --- 共通ボタン -------------------------------------------------- */
.ym-lms-btn {
    display: inline-block;
    padding: .5em 1.2em;
    border: 2px solid transparent;
    border-radius: var(--ym-radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--ym-transition), color var(--ym-transition), border-color var(--ym-transition);
    line-height: 1.4;
}
.ym-lms-btn--primary {
    background: var(--ym-primary);
    color: #fff;
    border-color: var(--ym-primary);
}
.ym-lms-btn--primary:hover {
    background: var(--ym-primary-h);
    border-color: var(--ym-primary-h);
}
.ym-lms-btn--secondary {
    background: #fff;
    color: var(--ym-primary);
    border-color: var(--ym-primary);
}
.ym-lms-btn--secondary:hover {
    background: var(--ym-primary);
    color: #fff;
}
.ym-lms-btn--outline {
    background: transparent;
    color: #555;
    border-width: 1px;
    border-color: #aaa;
    transition: background .2s ease;
}
.ym-lms-btn--outline:hover {
    background: #f5f5f5 !important;
    text-decoration: none !important;
    color: #333 !important;
}
.ym-lms-btn--danger {
    background: var(--ym-danger);
    color: #fff;
    border-color: var(--ym-danger);
}
.ym-lms-btn--danger:hover {
    background: var(--ym-danger-h);
    border-color: var(--ym-danger-h);
}
/* pill ボタン（Figma: border-radius 100px） */
.ym-lms-btn--pill {
    border-radius: var(--ym-radius-pill);
    padding: .75rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    text-align: center;
}
.ym-lms-btn--disabled,
.ym-lms-btn[disabled] {
    background: var(--ym-border);
    color: #fff;
    border-color: var(--ym-border);
    cursor: not-allowed;
    pointer-events: none;
}

/* --- ダッシュボード ----------------------------------------------- */
.ym-lms-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    color: var(--ym-text);
}
.ym-lms-dashboard__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.ym-lms-dashboard__header h2 {
    margin: 0;
}
.ym-lms-dashboard__nav {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 2rem;
}
.ym-lms-plan-badge {
    margin: 0;
    padding: .2em .7em;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
}
.ym-lms-plan-badge--free { background: #eee; color: #555; }
.ym-lms-plan-badge--paid { background: #d4edda; color: #155724; }

.ym-lms-section { margin-bottom: 2.5rem; }
.ym-lms-section__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ym-lms-section__head h3 { margin: 0; }
.ym-lms-limit-note { font-size: .8rem; color: #888; }

/* --- テーブル ---------------------------------------------------- */
.ym-lms-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.ym-lms-table th,
.ym-lms-table td {
    border: 1px solid var(--ym-border);
    padding: .6rem .8rem;
    text-align: left;
    vertical-align: middle;
}
.ym-lms-table th {
    background: var(--ym-bg);
    font-weight: 600;
}
.ym-lms-table tr:hover td {
    background: #f0f4ff;
}
.ym-lms-passcode {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: .1em;
}

/* --- フォーム ---------------------------------------------------- */
.ym-lms-form-group {
    margin-bottom: 1.2rem;
}
.ym-lms-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: .4rem;
    font-size: .9rem;
}
.ym-lms-form-group input[type="text"],
.ym-lms-form-group input[type="number"],
.ym-lms-form-group select {
    width: 100%;
    padding: .75rem 1.25rem;    /* Figma: py-[16px] px-[20px] */
    border: 2px solid var(--ym-border);
    border-radius: var(--ym-radius);
    font-size: 1rem;
}
.ym-lms-form-group select {
    padding-right: 2.5rem;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1rem center / 12px 8px;
    color: var(--ym-text);
    box-sizing: border-box;
    transition: border-color var(--ym-transition);
}
.ym-lms-form-group input::placeholder,
.ym-lms-form-group select option:first-child {
    color: var(--ym-text-muted);
}
.ym-lms-form-group input:focus,
.ym-lms-form-group select:focus {
    outline: none;
    border-color: var(--ym-primary);
    box-shadow: 0 0 0 3px rgba(139, 186, 187, .25);
}
/* --- カスタムセレクト（配布モーダル等） --- */
.ym-lms-custom-select {
    position: relative;
    width: 100%;
}
.ym-lms-custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .75rem 1.25rem;
    border: 2px solid var(--ym-border);
    border-radius: var(--ym-radius);
    background: #fff;
    font-size: 1rem;
    color: var(--ym-text);
    cursor: pointer;
    transition: border-color var(--ym-transition);
    text-align: left;
}
.ym-lms-custom-select__trigger:focus {
    outline: none;
    border-color: var(--ym-primary);
    box-shadow: 0 0 0 3px rgba(139, 186, 187, .25);
}
.ym-lms-custom-select__text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ym-lms-custom-select__arrow {
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.2s;
}
.ym-lms-custom-select.is-open .ym-lms-custom-select__arrow {
    transform: rotate(180deg);
}
.ym-lms-custom-select__options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid var(--ym-border);
    border-radius: var(--ym-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 0;
}
.ym-lms-custom-select.is-open .ym-lms-custom-select__options {
    display: block;
}
.ym-lms-custom-select__option {
    padding: .75rem 1.25rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--ym-text);
    transition: background-color 0.15s;
}
.ym-lms-custom-select__option:hover {
    background: #f5f5f5;
}
.ym-lms-custom-select__option.is-selected {
    color: var(--ym-primary);
    font-weight: 700;
}

.ym-lms-copy-group {
    display: flex;
    gap: .5rem;
}
.ym-lms-copy-group input {
    flex: 1;
}
.ym-lms-help-text {
    font-size: .8rem;
    color: #666;
    margin-top: .4rem;
}

/* --- アラート ---------------------------------------------------- */
.ym-lms-alert {
    padding: .75rem 1rem;
    border-radius: var(--ym-radius);
    font-size: .9rem;
    margin-bottom: 1rem;
}
.ym-lms-alert--error {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}
.ym-lms-notice {
    padding: .75rem 1rem;
    border-radius: var(--ym-radius);
    font-size: .85rem;
    margin-bottom: 1.2rem;
}
.ym-lms-downgrade-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: .9rem;
    line-height: 1.5;
}
.ym-lms-notice--info {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* --- モーダル ---------------------------------------------------- */
.ym-lms-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}
.ym-lms-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ym-lms-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}
.ym-lms-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 32px 0 40px;
    width: min(480px, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--ym-shadow);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: stretch;
}
.ym-lms-modal__dialog > * {
    padding-left: 24px;
    padding-right: 24px;
}
.ym-lms-modal__dialog h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #333;
    line-height: 1.4;
}
.ym-lms-dist-description {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}
.ym-lms-modal__dialog .ym-lms-form-group {
    margin-bottom: 0;
}
.ym-lms-modal__dialog form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ym-lms-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: #888;
    padding: 0 .3rem;
}
.ym-lms-modal__close:hover { color: #333; }
/* ボタンエリア: 縦並び・全幅（Figma準拠） */
.ym-lms-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}
.ym-lms-modal__actions .ym-lms-btn {
    width: 100%;
    text-align: center;
    padding: 12px 24px;
}
/* 削除確認モーダルの本文テキスト */
.ym-lms-modal__body-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* --- 配布パネル（固定ボタン） ----------------------------------- */
#ym-lms-distribution-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}
#ym-lms-distribution-toggle {
    box-shadow: var(--ym-shadow);
    font-size: 1rem;
    padding: .7em 1.5em;
}

/* --- 共通ページレイアウト ----------------------------------------- */
.ym-lms-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 30px 40px 100px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}
.ym-lms-page__title {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #333 !important;
    text-align: center !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    width: 100%;
    background: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
.ym-lms-page__footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* --- クラスカード（学習結果TOP） ---------------------------------- */
.ym-lms-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}
.ym-lms-class-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 16px;
    border: 1px solid #999;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background .15s;
}
.ym-lms-class-card:hover {
    background: #f7f7f7;
    text-decoration: none;
}
.ym-lms-class-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ym-lms-class-card__name {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
}
.ym-lms-class-card__meta {
    display: flex;
    gap: 14px;
    font-size: 14px;
    line-height: 1.5;
    flex-wrap: wrap;
}
.ym-lms-class-card__arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ピル形アウトラインボタン */
.ym-lms-btn--outline-pill {
    background: #fff;
    border: 1px solid #999;
    border-radius: 100px;
    color: #333;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background .15s;
    line-height: 1.5;
}
.ym-lms-btn--outline-pill:hover {
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
}
.ym-lms-btn--full {
    width: 100%;
    box-sizing: border-box;
}

/* --- 個別結果カード（出席番号別詳細） ----------------------------- */
.ym-lms-result-card {
    background: #E6F2F2;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}
.ym-lms-result-card__header {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #999;
}
.ym-lms-result-card__score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    padding: 10px 0;
}
.ym-lms-result-card__score-num {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}
.ym-lms-result-card__score-denom {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.ym-lms-result-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.ym-lms-result-detail__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 5px;
    font-size: 16px;
    color: #333;
}
.ym-lms-result-detail__label {
    width: 80px;
    flex-shrink: 0;
    font-weight: 500;
}
.ym-lms-result-detail__value {
    font-weight: 700;
}

/* --- 出席番号別結果リスト（Figma: 429-2806） --------------------- */
.ym-lms-result-list {
    width: 100%;
}
.ym-lms-result-list__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 5px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.ym-lms-result-list__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 5px;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
    color: #333;
    transition: background .15s;
}
.ym-lms-result-list__row:last-child {
    border-bottom: none;
}
.ym-lms-result-list__row:hover {
    background: #f7f7f7;
    text-decoration: none;
    color: #333;
}
.ym-lms-result-list__col-no {
    width: 100px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 16px;
}
.ym-lms-result-list__col-score {
    flex: 1;
    font-weight: 700;
    font-size: 16px;
}
.ym-lms-result-list__arrow {
    flex-shrink: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ドリル配布履歴リスト列（Figma: 429-2733） */
.ym-lms-drill-row {
    gap: 20px;
}
.ym-lms-drill-col-date {
    width: 110px;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}
.ym-lms-result-list__header .ym-lms-drill-col-date,
.ym-lms-result-list__header .ym-lms-drill-col-title {
    font-weight: 500;
}
.ym-lms-drill-col-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 学習結果 --------------------------------------------------- */
.ym-lms-results {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
.ym-lms-breadcrumb {
    font-size: .85rem;
    color: #888;
    margin-bottom: 1rem;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    align-items: center;
}
.ym-lms-breadcrumb a { color: var(--ym-primary); text-decoration: none; }
.ym-lms-breadcrumb a:hover { text-decoration: underline; }

/* --- トースト通知 ----------------------------------------------- */
.ym-lms-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #323232;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: 24px;
    font-size: .9rem;
    z-index: 999999;
    box-shadow: var(--ym-shadow);
    animation: ym-lms-fade-in .3s ease;
}
@keyframes ym-lms-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- 必須バッジ（Figma: label/need） ------------------------------ */
.ym-lms-required-badge {
    display: inline-block;
    background: #F55538;
    color: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    padding: 3px 4px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* --- ユーティリティ ---------------------------------------------- */
.ym-lms-empty { color: #888; }
.ym-lms-upgrade-notice { font-size: .85rem; margin-top: .5rem; }
.required { color: var(--ym-danger); }

/* --- ヘッダーボタン（配布・メニュー） ----------------------------- */
/* gnav に appendChild されたあと、ナビ項目の右隣に並ぶよう設定 */
/* FOUC防止は sp_btns.php のインラインスクリプトで対処済み（CSS不要） */

/* PC大 (1233px以上): gnav を表示してナビ項目と先生ボタンを収容する。
   SWELL 本体がデフォルトで非表示にするため !important で上書き。 */
@media screen and (min-width: 1233px) {
    #body_wrap.ym-lms-is-teacher #header .l-header__gnav {
        display: flex !important;
        align-items: center;
        margin-left: auto;
    }
}

/* 960px〜1232px: ナビ+ボタンの間隔統一（gnavにボタンが入るためgapで制御） */
@media screen and (min-width: 960px) and (max-width: 1232px) {
    #body_wrap.ym-lms-has-header-btns #header .l-header__gnav {
        display: flex !important;
        align-items: center;
        gap: 40px;
    }
}

/* SP (959px以下): l-header__inner を3カラムグリッドに変換して
   [ロゴ(auto)] [空白(1fr)] [ボタン(auto)] のレイアウトを実現する。
   ロゴ左端・ボタン右端。子テーマの justify-content:center / logo order:1 を上書きする。
   960px以上では子テーマの flex レイアウトに任せる。 */
@media screen and (max-width: 959px) {
    /* SP: gnav を非表示にしてメニューボタンに統合 */
    #body_wrap.ym-lms-has-header-btns #header .l-header__gnav {
        display: none !important;
    }
}

.ym-lms-header-btns-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 40px;
}

.ym-lms-header-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 44px;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 6px 4px;
    cursor: pointer;
    gap: 2px;
    line-height: 1;
    overflow: hidden;
    transition: background var(--ym-transition);
}
.ym-lms-header-btn span {
    font-size: 10px;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
#ym-lms-menu-open-btn {
    width: 58px;
}
.ym-lms-header-btn:hover {
    background: rgba(255,255,255,.85);
}
.ym-lms-header-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --- スライドメニュー -------------------------------------------- */
.ym-lms-slide-menu {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    flex-direction: row;
}
.ym-lms-slide-menu.is-open {
    display: flex;
}

.ym-lms-slide-menu__backdrop {
    flex: 1;
    background: rgba(0, 0, 0, .5);
    position: relative;
    cursor: pointer;
}

.ym-lms-slide-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.ym-lms-slide-menu__close svg {
    width: 20px;
    height: 20px;
    display: block;
}

.ym-lms-slide-menu__panel {
    flex: 0 0 400px;
    max-width: calc(100% - 56px);
    background: #fff;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* CTAボックス */
.ym-lms-menu-cta {
    background: #E6F2F2;
    border-radius: 8px;
    padding: 20px 18px;
    margin-bottom: 20px;
    text-align: center;
}
.ym-lms-menu-cta__text {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
}
.ym-lms-menu-cta__btn {
    display: block;
    background: #398CCF;
    color: #fff;
    border-color: #398CCF;
    font-size: 16px;
    padding: 12px 20px;
}
.ym-lms-menu-cta__btn:hover {
    background: #2d7ab8;
    border-color: #2d7ab8;
    color: #fff;
    text-decoration: none;
}

/* 会員メニューセクション */
.ym-lms-menu-section {
    padding: 10px 0;
    margin-bottom: 0;
}

.ym-lms-menu-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.ym-lms-menu-section__title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.ym-lms-menu-badge {
    background: #999999;
    color: #FFF;
    text-align: center;
    font-family: YuGothic, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 18px;
    padding: 2px 10px;
    border-radius: 4px;
}
.ym-lms-menu-badge--paid {
    background: #8BBABB;
}

.ym-lms-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ym-lms-menu-item {
    border-bottom: 1px solid #f0f0f0;
}
.ym-lms-menu-item:last-child {
    border-bottom: none;
}

.ym-lms-menu-item__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    min-height: 56px;
    box-sizing: border-box;
}
.ym-lms-menu-item__link--btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
/* スライドメニューバナー */
.ym-lms-menu-banner {
    display: block;
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.ym-lms-menu-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* 退会ボタン: Figmaデザインに非表示 */
#ym-lms-withdraw-btn,
li:has(#ym-lms-withdraw-btn) {
    display: none !important;
}

.ym-lms-menu-item__label--danger {
    color: #c00;
}
.ym-lms-btn--danger {
    background: #c00;
    color: #fff;
    border: 1px solid #c00;
}
.ym-lms-btn--danger:hover {
    background: #a00;
    border-color: #a00;
}
.ym-lms-menu-item__link:hover {
    color: var(--ym-primary);
    text-decoration: none;
}

.ym-lms-menu-item__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ym-lms-menu-item__icon svg {
    width: 20px;
    height: 20px;
}

.ym-lms-menu-item__label {
    flex: 1;
}

.ym-lms-menu-item__arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.ym-lms-menu-item__arrow svg {
    width: 16px;
    height: 16px;
}

/* 検索バー */
.ym-lms-menu-search {
    display: flex;
    height: 48px;
    margin-top: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}
.ym-lms-menu-search__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 16px;
    color: #333;
    background: #fff;
}
.ym-lms-menu-search__input::placeholder {
    color: #999;
}
.ym-lms-menu-search__btn {
    width: 48px;
    height: 100%;
    background: #398CCF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ym-lms-menu-search__btn svg {
    width: 20px;
    height: 20px;
}

/* --- アップグレード誘導 ------------------------------------------ */
.ym-lms-upgrade-notice a {
    color: var(--ym-primary);
    font-weight: 600;
    text-decoration: underline;
}

/* --- ダッシュボード TOP（ナビカード） ----------------------------- */
.ym-lms-dashboard-top {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 0 100px;
    color: var(--ym-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.ym-lms-dashboard-top__title {
    margin: 0 !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    width: 100%;
    color: #333 !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
/* ================================================================
   プラン選択ページ（/plan/）
   ================================================================ */
.ym-lms-plan-page {
    max-width: 560px;
    margin: 0 auto;
}

.ym-lms-plan-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.ym-lms-plan-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color var(--ym-transition), box-shadow var(--ym-transition);
    outline: none;
}
.ym-lms-plan-card:hover,
.ym-lms-plan-card:focus {
    border-color: var(--ym-primary);
}
.ym-lms-plan-card.is-selected {
    border-color: var(--ym-primary);
    box-shadow: 0 0 0 1px var(--ym-primary);
}

.ym-lms-plan-card__check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #ccc;
    transition: color var(--ym-transition);
}
.ym-lms-plan-card.is-selected .ym-lms-plan-card__check {
    color: var(--ym-primary);
}

.ym-lms-plan-card__body {
    flex: 1;
    min-width: 0;
}
.ym-lms-plan-card__info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.ym-lms-plan-card__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ym-text);
}
.ym-lms-plan-card__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--ym-primary);
    white-space: nowrap;
}
.ym-lms-plan-card__desc {
    margin: 0;
    font-size: 13px;
    color: #777;
}

.ym-lms-plan-note {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* --- プラン変更完了 -------------------------------------------- */
.ym-lms-plan-complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    width: 100%;
}
.ym-lms-plan-complete__icon {
    line-height: 1;
}
.ym-lms-plan-complete__title {
    margin: 0 !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #222 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
}
.ym-lms-plan-complete__body {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}
/* 完了画面（?registered=1 / ?plan_complete=1 / ?confirmed=1）: SWELLのページタイトルを非表示 */
.ym-lms-completion-page .c-pageTitle,
.ym-lms-completion-page .p-entryTitle {
    display: none;
}

/* --- 仮会員登録完了 (/plan/?registered=1) -------------------------------- */
.ym-lms-provisional-reg-page {
    justify-content: center;
    max-width: 640px;
}
.ym-lms-provisional-reg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    width: 100%;
}
.ym-lms-provisional-reg__body {
    font-size: 14px;
    color: var(--ym-text);
    line-height: 1.8;
    margin: 0;
    text-align: center;
}
.ym-lms-provisional-reg__email-box {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px 24px;
    width: 100%;
}
.ym-lms-provisional-reg__email-label {
    margin: 0 0 6px;
    font-size: 12px;
    color: #888;
}
.ym-lms-provisional-reg__email-value {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ym-text);
    word-break: break-all;
}
.ym-lms-provisional-reg__note {
    font-size: 12px;
    color: #888;
    text-align: left;
    width: 100%;
    margin: 0;
    line-height: 1.7;
}
.ym-lms-provisional-reg__reregister-link {
    font-size: 14px;
    color: #2b7be9;
    text-decoration: underline;
}

/* 会員登録完了タイトル: SWELLのh2デフォルト背景・ボーダーをリセット */
.ym-lms-register-complete__title {
    margin: 0 !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #222 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
}

/* --- アカウントページ (/account/) -------------------------------------- */
.ym-lms-account-page {
    justify-content: flex-start;
    padding-bottom: 80px;
}
.post_content .ym-lms-page p,
.post_content .ym-lms-dashboard-top p,
.post_content .ym-lms-classes-page p {
    margin-bottom: 0;
}
.ym-lms-account {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ym-lms-account__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ym-lms-account__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--ym-text);
    margin: 0;
}
.ym-lms-account__value {
    font-size: 15px;
    color: #555;
    margin: 0;
}
.ym-lms-account__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.ym-lms-account__form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ym-lms-account__input {
    width: 100%;
    height: 56px;
    padding: 0 48px 0 20px;
    border: 2px solid var(--ym-border);
    border-radius: var(--ym-radius);
    font-size: 16px;
    color: var(--ym-text);
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color var(--ym-transition);
}
.ym-lms-account__input:focus {
    border-color: var(--ym-primary);
}
.ym-lms-account__input::placeholder {
    color: #bbb;
}
.ym-lms-account__error {
    margin: 0;
    font-size: 13px;
    color: var(--ym-danger);
    line-height: 1.6;
}

/* アカウントページ: 退会セクション */
.ym-lms-account__withdraw-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.ym-lms-account__divider {
    border: none;
    border-top: 1px solid #E0E0E0;
    margin: 0;
}

.ym-lms-account__withdraw-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--ym-text);
    margin: 0;
}

.ym-lms-account__withdraw-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.6;
}

/* アカウントページのパスワードラッパー（目アイコンをinput内右端に配置） */
.ym-lms-account .ym-lms-pass-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.ym-lms-account .ym-lms-pass-wrap .ym-lms-custom-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 0;
    display: flex;
    align-items: center;
    z-index: 1;
    line-height: 1;
}

@media (max-width: 959px) {
    /* --- 共通ページ --- */
    .ym-lms-page {
        padding: 24px 24px 40px;
        gap: 24px;
    }
    .ym-lms-page__title {
        font-size: 24px !important;
    }

    /* --- ダッシュボード TOP --- */
    .ym-lms-dashboard-top {
        max-width: none;
        padding: 24px 24px 60px;
        gap: 40px;
    }
    .ym-lms-dashboard-top__title {
        font-size: 24px !important;
    }
    .ym-lms-nav-cards {
        gap: 16px;
    }
    .ym-lms-nav-card {
        padding: 20px;
    }
    .ym-lms-nav-card__icon,
    .ym-lms-nav-card__icon svg,
    .ym-lms-nav-card__icon img {
        width: 32px;
        height: 32px;
    }
    .ym-lms-nav-card__text {
        gap: 10px;
    }
    .ym-lms-nav-card__label {
        font-size: 16px;
    }

    /* --- クラス一覧ページ --- */
    .ym-lms-classes-page {
        padding: 24px 24px 60px;
        gap: 24px;
    }
    .ym-lms-classes-page__title {
        font-size: 24px;
    }
    .ym-lms-free-notice {
        font-size: 14px;
    }
    .ym-lms-classes-page .ym-lms-class-list-table {
        font-size: 14px;
    }
    .ym-lms-classes-page .ym-lms-class-list-table tbody tr {
        height: 52px;
    }

    /* --- 学習結果カード --- */
    .ym-lms-class-card {
        padding: 14px 16px 14px 20px;
    }
    .ym-lms-class-card__name {
        font-size: 15px;
    }
    .ym-lms-class-card__meta {
        font-size: 13px;
        gap: 8px;
    }

    /* --- 結果リスト --- */
    .ym-lms-result-list__col-no {
        width: 70px;
        font-size: 14px;
    }
    .ym-lms-result-list__col-score {
        font-size: 14px;
    }
    .ym-lms-drill-col-date {
        width: 80px;
        font-size: 14px;
    }
    .ym-lms-drill-col-title {
        font-size: 14px;
    }

    /* --- モーダル --- */
    .ym-lms-modal__dialog {
        padding: 32px 0 40px;
    }
    .ym-lms-modal__dialog > * {
        padding-left: 24px;
        padding-right: 24px;
    }
    .ym-lms-modal__dialog h3 {
        font-size: 20px;
    }
    .ym-lms-modal__actions {
        gap: 24px;
        margin-top: 20px;
    }

    /* --- スライドメニュー --- */
    .ym-lms-slide-menu__backdrop {
        flex: 1;
        min-width: 60px;
    }
    .ym-lms-slide-menu__close {
        top: 12px;
        right: 8px;
    }
    .ym-lms-slide-menu__panel {
        flex: 0 0 auto;
        width: 85vw;
        max-width: calc(100vw - 64px);
        padding: 16px;
    }
    .ym-lms-menu-section__title {
        font-size: 14px;
    }
    .ym-lms-menu-item__link {
        font-size: 14px;
        min-height: 48px;
    }
    .ym-lms-menu-search {
        margin-top: 12px;
        height: 44px;
    }

    /* --- ログイン/登録ページ: SP左右padding --- */
    #body_wrap.pmpro-login .post_content,
    #body_wrap.pmpro-checkout .post_content {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

/* Figma 準拠: 縦積み1カラム */
.ym-lms-nav-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

.ym-lms-nav-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ym-text);
    background: #fff;
    border: 1px solid #999;
    border-radius: 16px;
    padding: 24px;
    transition: box-shadow var(--ym-transition), transform var(--ym-transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.ym-lms-nav-card:hover {
    background: #f5f5f5;
    color: var(--ym-text);
    text-decoration: none;
}

/* アイコン上・テキスト下・中央揃え */
.ym-lms-nav-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    width: 100%;
}

.ym-lms-nav-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ym-lms-nav-card__icon svg,
.ym-lms-nav-card__icon img {
    width: 40px;
    height: 40px;
}

.ym-lms-nav-card__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.ym-lms-nav-card__label {
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.4;
}
.ym-lms-nav-card__count {
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #333;
}
.ym-lms-nav-card__num {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

/* --- クラス一覧ページ -------------------------------------------- */
.ym-lms-classes-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 30px 40px 100px;
    color: var(--ym-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}
.ym-lms-classes-page__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    color: #333 !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* 無料プラン通知（縦並び・テキストスタイル） */
.ym-lms-free-plan-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}
.ym-lms-free-notice {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    text-align: center;
}
.ym-lms-results-notice {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}
.ym-lms-plan-link {
    color: #398CCF;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-align: center;
}
.ym-lms-plan-link:hover {
    color: #2a7ac0;
    text-decoration: underline;
}

/* クラス一覧テーブル（SWELLの .post_content th 装飾を上書き） */
.ym-lms-classes-page .ym-lms-class-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background: #fff;
}
.ym-lms-classes-page .ym-lms-class-list-table th,
.ym-lms-classes-page .ym-lms-class-list-table td {
    padding: 0 12px;
    text-align: left;
    vertical-align: middle;
    border: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
    background: #fff !important;
    color: #333 !important;
}
.ym-lms-classes-page .ym-lms-class-list-table th {
    font-weight: 500;
    font-size: 14px;
    height: 48px;
}
.ym-lms-classes-page .ym-lms-class-list-table tbody tr {
    height: 64px;
}
.ym-lms-classes-page .ym-lms-class-list-table tbody tr:last-child td {
    border-bottom: none !important;
}
.ym-lms-classes-page .ym-lms-class-list-table th:first-child,
.ym-lms-classes-page .ym-lms-class-list-table td.ym-lms-class-name {
    width: 100px;
    font-weight: 700;
}
.ym-lms-classes-page .ym-lms-class-list-table .ym-lms-passcode {
    font-weight: 700;
}
.ym-lms-classes-page .ym-lms-class-list-table .ym-lms-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.ym-lms-classes-page .ym-lms-class-list-table .ym-lms-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ym-lms-classes-page .ym-lms-class-list-table .ym-lms-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* アイコンボタン（削除・編集） */
.ym-lms-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ym-lms-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--ym-transition);
    color: #555;
}
.ym-lms-icon-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}
.ym-lms-icon-btn:hover {
    opacity: 0.8;
}
.ym-lms-delete-class:hover {
    background: #fdecea;
}
.ym-lms-delete-class:hover svg path {
    stroke: var(--ym-danger);
}

/* クラス作成ボタン */
.ym-lms-create-section {
    width: 100%;
}
.ym-lms-create-section .ym-lms-btn--pill {
    width: 100%;
    display: block;
    text-align: center;
}

/* 戻るボタン（ピル型） */
.ym-lms-back-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    border: 1px solid #999;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: center;
    text-decoration: none;
    background: #fff;
    transition: background var(--ym-transition);
    box-sizing: border-box;
}
.ym-lms-back-btn:hover {
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
}

/* --- ダッシュボード配下ページ: SWELL ページタイトル非表示・メインコンテンツ全幅 --- */
/* .ym-lms-dashboard-page は class-teacher-nav.php が /dashboard/ 配下に付与 */
/* プラグイン側テンプレートが独自 h1/h2 を持つため SWELL の c-pageTitle を隠す */
#body_wrap.ym-lms-dashboard-page .c-pageTitle {
    display: none !important;
}

/* サイドバー非表示でも main content 幅が自動拡張されないため全幅化               */
/* .ym-lms-member-page は /dashboard/ /plan/ /account/ 配下に付与（class-teacher-nav.php） */
/* #top_title_area は header.php でコンテンツの前に出力される min-height:11em(176px) の要素。
   メンバーページはショートコードがタイトルを持つため非表示にする。 */
#body_wrap.ym-lms-member-page #top_title_area {
    display: none !important;
}
#body_wrap.ym-lms-member-page #sidebar,
#body_wrap.ym-lms-member-page .l-sidebar {
    display: none !important;
}
#body_wrap.ym-lms-member-page {
    --article_size: 100%;
    --swl-sidebar_width: 0px;
    --swl-sidebar_margin: 0px;
}
#body_wrap.ym-lms-member-page #main_content,
#body_wrap.ym-lms-member-page .l-mainContent {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
}

/* 子テーマが .page に flex: 0 0 70% を適用するのを常時打ち消す */
/* SWELLの .l-content{margin:0 auto 6em} を打ち消す */
/* padding-top はSWELLデフォルト（2em/4em）に委ねる。
   ヘッダーは position:relative のためスクロールで消える通常フロー。
   子テーマの margin-top:-3rem がカーブオーバーラップを担う。 */
#body_wrap.ym-lms-member-page #content.l-content,
#body_wrap.ym-lms-member-page #content.l-content.l-container {
    display: block !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    min-height: calc(100vh - 130px - 80px);
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#body_wrap.ym-lms-member-page #content .l-mainContent.l-article {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}
#body_wrap.ym-lms-member-page .l-mainContent .post_content {
    max-width: 100% !important;
    margin: 0 !important;
}
/* SWELLページタイトルを非表示（テンプレート側のタイトルに統一） */
#body_wrap.ym-lms-member-page .c-pageTitle {
    display: none !important;
}

@media screen and (min-width: 960px) {
    #body_wrap.ym-lms-member-page .l-mainContent.l-article {
        padding: 0 !important;
    }
    #body_wrap.ym-lms-member-page .l-mainContent .post_content {
        padding: 0 !important;
    }
}

/* --- ログインページ ------------------------------------------- */
/* bodyクラスは pmpro-login（page-login ではない） */

/* #top_title_area を非表示（min-height:11emの余白を除去） */
#body_wrap.pmpro-login #top_title_area {
    display: none !important;
}
/* サイドバー非表示・コンテンツ全幅（Figma: サイドバーなし単一カラム） */
#body_wrap.pmpro-login #sidebar,
#body_wrap.pmpro-login .l-sidebar {
    display: none !important;
}
#body_wrap.pmpro-login #main_content,
#body_wrap.pmpro-login .l-mainContent {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    flex: none !important;
}

/* SWELLの .l-content{margin:0 auto 6em} / .post_content{margin:4em 0} を打ち消す */
#body_wrap.pmpro-login #content.l-content {
    display: block !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
}
#body_wrap.pmpro-login .l-mainContent .post_content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* フォーム中央寄せ・幅制限 */
#body_wrap.pmpro-login .post_content,
#body_wrap.pmpro-login .c-pageTitle {
    max-width: 560px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ページタイトル「ログイン」: Figma 準拠（32px Bold 中央、SWELL装飾を除去） */
#body_wrap.pmpro-login .c-pageTitle,
#body_wrap.pmpro-login .c-pageTitle[data-style] {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #333 !important;
    margin-bottom: 40px !important;
    border: none !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    background: none !important;
}
#body_wrap.pmpro-login .c-pageTitle::before,
#body_wrap.pmpro-login .c-pageTitle::after,
#body_wrap.pmpro-login .c-pageTitle__inner::before,
#body_wrap.pmpro-login .c-pageTitle__inner::after {
    display: none !important;
}
/* SWELL b_bottom: .c-pageTitle__inner の float:left を打ち消して中央揃えを実現 */
#body_wrap.pmpro-login .c-pageTitle__inner {
    float: none !important;
    display: block !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    text-align: center !important;
}

/* PMPro カード背景・ボーダー・余白を完全に除去 */
#body_wrap.pmpro-login .pmpro_card,
#body_wrap.pmpro-login .pmpro_login_wrap {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
#body_wrap.pmpro-login .pmpro_card_content {
    padding: 0 !important;
    background: none !important;
}

/* ログインボタン（wp_login_form の #wp-submit）: Figma 青・ピル型 */
#body_wrap.pmpro-login #wp-submit {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 12px 24px;
    background: #398CCF !important;
    color: #fff !important;
    border: none;
    border-radius: 100px;
    font-family: 'YuGothic', 'Yu Gothic', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease;
    box-sizing: border-box;
    height: 48px;
    margin-top: 16px;
    box-shadow: none !important;
}
#body_wrap.pmpro-login #wp-submit:hover {
    background: #2a7ac0 !important;
}

/* 「ログイン状態を保存する」チェックボックスを非表示（PMPro: p.login-remember） */
#body_wrap.pmpro-login p.login-remember,
.pmpro_login_wrap p.login-remember,
#loginform p.login-remember {
    display: none !important;
}

/* PMPro card_actions（パスワードを忘れた方）: 背景・ボーダー除去、Figma 準拠スタイル */
#body_wrap.pmpro-login .pmpro_card_actions,
#body_wrap.pmpro-login .pmpro_actions_nav {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
#body_wrap.pmpro-login .pmpro_card_actions a {
    color: #398CCF !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    display: block !important;
    text-align: center !important;
    margin-top: 32px !important;
}

/* 入力フィールド: Figma 準拠（border #DFDFDF、radius 8、height 56px） */
#body_wrap.pmpro-login #user_login,
#body_wrap.pmpro-login #user_pass {
    width: 100% !important;
    height: 56px !important;
    border: 1px solid #DFDFDF !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    font-size: 16px !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    color: #333 !important;
}

/* パスワード入力: 右側に目アイコン分の余白 */
#body_wrap.pmpro-login #user_pass {
    padding-right: 48px !important;
}

/* ラベル: Figma 準拠（14px、weight 500、#333） */
#body_wrap.pmpro-login .login-username label,
#body_wrap.pmpro-login .login-password > label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    display: block !important;
    margin-bottom: 0 !important;
}

/* パスワード入力ラッパー: JS で生成、input + 目アイコンの位置基準 */
.ym-lms-pass-input-wrap {
    position: relative;
    display: block;
}

/* PMPro パスワード表示トグル: ラッパー内で input の垂直中央に絶対配置 */
.ym-lms-pass-input-wrap .pmpro_form_field-password-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: auto !important;
}

/* 目アイコンボタン: デフォルトスタイルをリセット */
#body_wrap.pmpro-login #pmpro_btn-password-toggle-1 {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

/* 「Show Password」テキストを非表示 */
#body_wrap.pmpro-login .pmpro_form_field-password-toggle-state {
    display: none !important;
}

/* 目アイコンの色: Figma (#333333) に合わせて SVG ストロークを上書き */
#body_wrap.pmpro-login .pmpro_form_field-password-toggle svg {
    stroke: #333333 !important;
}

/* フォームの段落間余白（Figma 実測値） */
#body_wrap.pmpro-login #loginform p.login-username {
    margin-bottom: 20px;  /* フィールド間 gap: 20px */
}
#body_wrap.pmpro-login #loginform p.login-password {
    margin-bottom: 0;
}
#body_wrap.pmpro-login #loginform p.login-submit {
    margin-top: 40px;  /* フィールド → ボタン（Figma: gap 40px） */
    margin-bottom: 0;
}

/* キャンセルボタン: Figma 準拠（border #999999、text #333、height 48px） */
#body_wrap.pmpro-login .ym-lms-btn--outline.ym-lms-btn--pill {
    border-width: 1px !important;
    border-color: #999999 !important;
    color: #333333 !important;
    background: #FFFFFF !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    transition: background .2s ease !important;
    text-decoration: none !important;
}
#body_wrap.pmpro-login .ym-lms-btn--outline.ym-lms-btn--pill:hover {
    background: #f5f5f5 !important;
    text-decoration: none !important;
    color: #333 !important;
}

/* パスワードを忘れた方: ボタンコンテナ→リンク */
#body_wrap.pmpro-login .pmpro_card_actions {
    margin-top: 0 !important;
}

/* ─── パスワードリセットフォーム（?action=reset_pass）─────────── */

/* 説明文 */
#body_wrap.pmpro-login #lostpasswordform > p:not(.submit) {
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.7 !important;
    margin-bottom: 24px !important;
}

/* ラベル必須アスタリスク非表示 */
#body_wrap.pmpro-login #lostpasswordform label .required,
#body_wrap.pmpro-login #lostpasswordform label abbr,
#body_wrap.pmpro-login #lostpasswordform label span[class*="required"] {
    display: none !important;
}

/* メールアドレス入力欄（ログインページと同じスタイルを適用） */
#body_wrap.pmpro-login #lostpasswordform #user_login {
    width: 100% !important;
    height: 56px !important;
    border: 1px solid #DFDFDF !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    font-size: 16px !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    color: #333 !important;
    margin-top: 8px;
}

/* ラベルスタイル */
#body_wrap.pmpro-login #lostpasswordform label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    display: block !important;
}

/* lostpasswordform内のpタグのマージンをリセット */
#body_wrap.pmpro-login #lostpasswordform p {
    margin-bottom: 0 !important;
}
/* 送信ボタン（ログインと同じ青・ピル型） */
#body_wrap.pmpro-login #lostpasswordform p.submit,
#body_wrap.pmpro-login #lostpasswordform .pmpro_form_submit {
    margin-top: 32px !important;
    margin-bottom: 0 !important;
}
#body_wrap.pmpro-login #lostpasswordform #wp-submit,
#body_wrap.pmpro-login #lostpasswordform input[type="submit"] {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    background: #398CCF !important;
    color: #fff !important;
    border: none !important;
    border-radius: 100px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background .2s ease !important;
    box-shadow: none !important;
}
#body_wrap.pmpro-login #lostpasswordform #wp-submit:hover,
#body_wrap.pmpro-login #lostpasswordform input[type="submit"]:hover {
    background: #2a7ac0 !important;
}

/* キャンセルリンク */
#body_wrap.pmpro-login .ym-lms-reset-cancel {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    border: 1px solid #999999 !important;
    border-radius: 100px !important;
    background: #FFFFFF !important;
    color: #333 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: background .2s ease !important;
}
#body_wrap.pmpro-login .ym-lms-reset-cancel:hover {
    background: #f5f5f5 !important;
    text-decoration: none !important;
    color: #333 !important;
}

/* ─── パスワード再設定フォーム（?action=rp）─────────────────── */

/* 2カラム → 縦積み */
#body_wrap.pmpro-login #resetpassform .pmpro_cols-2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

/* フォームフィールド: 目アイコン絶対配置の基準 */
#body_wrap.pmpro-login #resetpassform .pmpro_form_field-pass1 {
    position: relative !important;
}

/* ラベル+アイコンラッパー: ラベルのみ表示（ブロック） */
#body_wrap.pmpro-login #resetpassform .pmpro_form_field-password-toggle {
    display: block !important;
    margin-bottom: 8px !important;
}

/* 目アイコンボタン: input 右端に絶対配置 */
#body_wrap.pmpro-login #resetpassform .pmpro_btn-password-toggle {
    position: absolute !important;
    right: 12px !important;
    bottom: 0 !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    z-index: 1 !important;
}

/* 「Show Password」テキスト非表示 */
#body_wrap.pmpro-login #resetpassform .pmpro_form_field-password-toggle-state {
    display: none !important;
}

/* SVG アイコン色 */
#body_wrap.pmpro-login #resetpassform .pmpro_form_field-password-toggle svg {
    stroke: #333333 !important;
}

/* ラベル */
#body_wrap.pmpro-login #resetpassform .pmpro_form_label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    display: block !important;
}

/* 必須アスタリスク非表示 */
#body_wrap.pmpro-login #resetpassform .pmpro_asterisk {
    display: none !important;
}

/* パスワード入力フィールド */
#body_wrap.pmpro-login #resetpassform #pass1,
#body_wrap.pmpro-login #resetpassform #pass2 {
    display: block !important;
    width: 100% !important;
    height: 56px !important;
    border: 1px solid #DFDFDF !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    font-size: 16px !important;
    padding: 0 48px 0 16px !important;  /* 右に目アイコン分のスペース */
    box-sizing: border-box !important;
    box-shadow: none !important;
    color: #333 !important;
}

/* パスワード強度インジケーター非表示（PMPro の強度チェックは JS で上書き） */
#body_wrap.pmpro-login #resetpassform #pass-strength-result {
    display: none !important;
}

/* 要件ヒント: 初期非表示→ JS で内容差し替え後に表示 */
#body_wrap.pmpro-login #resetpassform .pmpro_form_hint {
    display: none;
    font-size: 12px;
    color: #555;
    margin-top: 6px;
    line-height: 1.6;
}

/* 送信エリア */
#body_wrap.pmpro-login #resetpassform .pmpro_form_submit {
    margin-top: 40px !important;
    margin-bottom: 0 !important;
}

/* 送信ボタン: ログインと同じ青・ピル型 */
#body_wrap.pmpro-login #resetpassform #resetpass-button {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    background: #398CCF !important;
    color: #fff !important;
    border: none !important;
    border-radius: 100px !important;
    font-family: 'YuGothic', 'Yu Gothic', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background .2s ease !important;
}

#body_wrap.pmpro-login #resetpassform #resetpass-button:hover {
    background: #2a7ac0 !important;
}

/* disabled 状態: グレーアウトして操作不能を明示 */
#body_wrap.pmpro-login #resetpassform #resetpass-button:disabled {
    background: #b0b8c1 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* パスワード注記テキスト */
.ym-lms-password-hint {
    font-size: 12px;
    color: #333;
    margin-top: 6px;
    line-height: 1.6;
}

/* ==========================================================
   ヘッダーメニューボタン（未ログイン・PC用）
   Figma: PC_メニュー表示 node 429-3128
   ========================================================== */

/* ヘッダーメニューボタン（Figma: fill=#FFFFFF stroke=#FFFFFF radius=8 48x44） */
.ym-lms-header-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 48px;
    height: 44px;
    border: 1px solid #FFFFFF;
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
    padding: 0;
    color: #333;
    flex-shrink: 0;
    margin-left: auto;  /* ヘッダー右端に寄せる */
}
.ym-lms-header-menu-btn span {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #333;
}
.ym-lms-header-menu-btn svg {
    stroke: #333;
}

/* ドロワーオーバーレイ（閉じるボタンの position: absolute 基準） */
.ym-lms-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9000;
}
.ym-lms-drawer-overlay.is-open {
    display: block;
}

/* ドロワーパネル（右からスライドイン, 400px） */
.ym-lms-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 100%;
    background: #FFFFFF;
    z-index: 9001;
    overflow-y: auto;
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
}
.ym-lms-drawer.is-open {
    right: 0;
}

/* 閉じるボタン（ドロワーの左横に配置） */
.ym-lms-drawer__close {
    position: fixed;
    top: 20px;
    right: calc(400px + 12px);
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.ym-lms-drawer__close svg {
    width: 20px;
    height: 20px;
    display: block;
}
@media screen and (max-width: 500px) {
    .ym-lms-drawer {
        max-width: calc(100vw - 64px);
    }
    .ym-lms-drawer__close {
        right: auto;
        left: 12px;
    }
}

/* ドロワー内コンテンツ */
.ym-lms-drawer__inner {
    padding: 12px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 会員登録プロモエリア（Figma: #FFEFE6、radius 8） */
.ym-lms-drawer__promo {
    background: #FFEFE6;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.ym-lms-drawer__promo-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}
.ym-lms-drawer__register-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #F55538;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border-radius: 100px;
    text-decoration: none;
}
.ym-lms-drawer__register-btn:hover {
    background: #d93e22;
    color: #FFFFFF;
}
.ym-lms-drawer__login-hint {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0;
    line-height: 1.6;
    text-decoration: underline;
}

/* 検索フォーム */
.ym-lms-drawer__search form {
    display: flex;
    border: 1px solid #DFDFDF;
    border-radius: 8px;
    overflow: hidden;
}
.ym-lms-drawer__search input[type="text"] {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    color: #333;
    min-width: 0;
    outline: none;
}
.ym-lms-drawer__search input[type="text"]::placeholder {
    color: #999;
}
.ym-lms-drawer__search button[type="submit"] {
    width: 48px;
    align-self: stretch;
    background: #398CCF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ナビゲーション */
.ym-lms-drawer__nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.ym-lms-drawer__nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #DFDFDF;
}
.ym-lms-drawer__nav-item:first-child {
    border-top: 1px solid #DFDFDF;
}
.ym-lms-drawer__nav-item a {
    display: block;
    flex: 1;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

/* バナー */
.ym-lms-drawer__banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================
   会員登録ページ（/register/）
   Figma: node 406-5150
   ========================================================== */

/* #top_title_area を非表示（min-height:11emの余白を除去） */
#body_wrap.pmpro-checkout #top_title_area {
    display: none !important;
}
/* サイドバー非表示・コンテンツ全幅 */
#body_wrap.pmpro-checkout #sidebar,
#body_wrap.pmpro-checkout .l-sidebar {
    display: none !important;
}
#body_wrap.pmpro-checkout #main_content,
#body_wrap.pmpro-checkout .l-mainContent {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}
/* SWELLの .l-content{margin:0 auto 6em} を打ち消す */
#body_wrap.pmpro-checkout #content.l-content {
    display: block !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
}
/* SWELLの .post_content{margin:4em 0} を打ち消す */
#body_wrap.pmpro-checkout .l-mainContent .post_content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* エラー/ステータスメッセージの影を無くす */
#pmpro_message,
.pmpro_message,
#pmpro_message_bottom {
    box-shadow: none !important;
}
/* エラーメッセージの重複表示を解消: PMPro は上部(#pmpro_message)と下部(#pmpro_message_bottom)の2箇所に表示するため下部を非表示 */
#pmpro_message_bottom {
    display: none !important;
}

/* フォームと h1 を中央寄せ・幅制限 */
#body_wrap.pmpro-checkout .post_content,
#body_wrap.pmpro-checkout .c-pageTitle {
    max-width: 560px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ページタイトル（SWELL 装飾を除去・中央揃え） */
#body_wrap.pmpro-checkout .c-pageTitle,
#body_wrap.pmpro-checkout .c-pageTitle[data-style] {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    border-bottom: none !important;
    margin-bottom: 32px !important;
    background: none !important;
}
#body_wrap.pmpro-checkout .c-pageTitle::before,
#body_wrap.pmpro-checkout .c-pageTitle::after,
#body_wrap.pmpro-checkout .c-pageTitle__inner::before,
#body_wrap.pmpro-checkout .c-pageTitle__inner::after {
    display: none !important;
}
#body_wrap.pmpro-checkout .c-pageTitle__inner {
    float: none !important;
    display: block !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    text-align: center !important;
}

/* Membership Information セクション非表示 */
#body_wrap.pmpro-checkout #pmpro_pricing_fields {
    display: none !important;
}

/* 説明文（Figma: fs=16, fw=500, color=#333） */
#body_wrap.pmpro-checkout .ym-lms-register-desc {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333 !important;
    line-height: 1.5 !important;
    margin-bottom: 40px !important;
    text-align: left !important;
}

/* PMPro カード・フィールドセットのリセット */
#body_wrap.pmpro-checkout .pmpro_card,
#body_wrap.pmpro-checkout #pmpro_user_fields {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
#body_wrap.pmpro-checkout .pmpro_card_content {
    padding: 0 !important;
    background: none !important;
}

/* Account Information 見出し非表示 */
#body_wrap.pmpro-checkout .pmpro_form_legend {
    display: none !important;
}

/* ラベル（Figma: fs=14, fw=700） */
#body_wrap.pmpro-checkout .pmpro_form_label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin-bottom: 4px !important;
}

/* 入力フィールド共通（Figma: h=56, border=2px #E0E0E0, cr=8, padding=16px 20px） */
#body_wrap.pmpro-checkout .pmpro_form_input {
    width: 100% !important;
    height: 56px !important;
    border: 2px solid #E0E0E0 !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    font-size: 16px !important;
    padding: 16px 20px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    color: #333 !important;
    outline: none !important;
}
#body_wrap.pmpro-checkout .pmpro_form_input:focus {
    border-color: #398CCF !important;
}

/* パスワードフィールド: 目アイコン分の右余白 */
#body_wrap.pmpro-checkout #password,
#body_wrap.pmpro-checkout #password2 {
    padding-right: 48px !important;
}

/* 「Show Password」テキスト非表示 */
#body_wrap.pmpro-checkout .pmpro_form_field-password-toggle-state {
    display: none !important;
}

/* フォームフィールド間の余白 */
#body_wrap.pmpro-checkout .pmpro_form_fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#body_wrap.pmpro-checkout .pmpro_form_field {
    margin: 0 !important;
}

/* パスワード確認フィールドのラベル非表示（複数セレクターで確実に対応） */
#body_wrap.pmpro-checkout .pmpro_form_field-password2 .pmpro_form_label,
#body_wrap.pmpro-checkout .pmpro_form_field-password2 label,
#body_wrap.pmpro-checkout label[for="password2"] {
    display: none !important;
}

/* 必須アスタリスク（*）非表示（Figma: アスタリスクなし） */
#body_wrap.pmpro-checkout .pmpro_form_label .pmpro_asterisk,
#body_wrap.pmpro-checkout .pmpro_form_label abbr,
#body_wrap.pmpro-checkout .pmpro_form_label abbr[title="required"],
#body_wrap.pmpro-checkout .pmpro_form_label .required {
    display: none !important;
}

/* pmpro_cols-2 を縦積みに変更（Figma: パスワード確認は全幅・縦並び） */
#body_wrap.pmpro-checkout .pmpro_cols-2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#body_wrap.pmpro-checkout .pmpro_cols-2 .pmpro_form_field {
    width: 100%;
}

/* パスワードフィールドを縦並びに強制（PMPro が flex-row にする場合の上書き） */
#body_wrap.pmpro-checkout .pmpro_form_field-password,
#body_wrap.pmpro-checkout .pmpro_form_field-password2 {
    display: block !important;
    position: relative !important;
}

/* パスワード目アイコン: JS で作成した .ym-lms-pass-wrap 内に絶対配置 */
#body_wrap.pmpro-checkout .ym-lms-pass-wrap {
    position: relative;
    display: block;
    width: 100%;
}
#body_wrap.pmpro-checkout .ym-lms-pass-wrap .pmpro_form_field-password-toggle {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #999 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    z-index: 1 !important;
    line-height: 1 !important;
}
/* CSS フォールバック（JS が未実行の場合） */
#body_wrap.pmpro-checkout .pmpro_form_field-password-wrapper {
    position: relative !important;
}
#body_wrap.pmpro-checkout .pmpro_form_field-password-wrapper .pmpro_form_field-password-toggle {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #999 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* 「すでに会員の方は」エリア非表示（Figma デザインにないため） */
#body_wrap.pmpro-checkout .pmpro_card_actions {
    display: none !important;
}

/* 利用規約チェックボックスエリア（Figma: gap=32 below fields, checkbox 24px, gap=10, fs=14 fw=500） */
#body_wrap.pmpro-checkout .ym-lms-terms-wrap {
    margin-top: 32px;
}
#body_wrap.pmpro-checkout .ym-lms-terms-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    user-select: none;
}

/* カスタムチェックボックス（Figma: 24×24, 角丸, 初期=グレー塗り, checked=#398CCF） */
#body_wrap.pmpro-checkout .ym-lms-terms-check {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: 2px solid #E0E0E0 !important;
    border-radius: 4px !important;
    background: #E0E0E0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transition: background .15s ease, border-color .15s ease;
}
/* 白チェックマークは常時表示（初期=グレー背景、チェック後=青背景） */
#body_wrap.pmpro-checkout .ym-lms-terms-check::after {
    content: '' !important;
    position: absolute !important;
    left: 6px !important;
    top: 2px !important;
    width: 8px !important;
    height: 13px !important;
    border: 2.5px solid #FFFFFF !important;
    border-top: none !important;
    border-left: none !important;
    transform: rotate(45deg) !important;
    display: block !important;
}
#body_wrap.pmpro-checkout .ym-lms-terms-check:checked {
    background: #398CCF !important;
    border-color: #398CCF !important;
}

/* 利用規約リンク（Figma: 24px checkbox + 10px gap = margin-left 34px、mt=6px） */
#body_wrap.pmpro-checkout .ym-lms-terms-link {
    display: block;
    margin-top: 6px;
    margin-left: 34px;
    font-size: 14px;
    color: #398CCF !important;
    text-decoration: underline !important;
}

/* 送信ボタンラッパー（Figma: gap=40 below fields+checkbox area） */
#body_wrap.pmpro-checkout .pmpro_form_submit {
    display: block !important;
    width: 100% !important;
    margin-top: 40px;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* 送信ボタン（Figma: h=48, cr=100, bg=#E0E0E0 デフォルト・チェック時 JS で #F55538 に変更） */
#body_wrap.pmpro-checkout #pmpro_btn-submit {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    background: #E0E0E0 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 100px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .2s ease !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* キャンセルボタン（Figma: h=48, cr=100, bg=#FFFFFF, border=1px solid #999999, text=#333） */
#body_wrap.pmpro-checkout .ym-lms-register-cancel {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    margin-top: 0 !important;
    background: #FFFFFF !important;
    color: #333 !important;
    border: 1px solid #999999 !important;
    border-radius: 100px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    line-height: 48px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background .2s ease !important;
}
#body_wrap.pmpro-checkout .ym-lms-register-cancel:hover {
    background: #f5f5f5 !important;
}
