/* ===================================================
   共通基本スタイル
   =================================================== */
/* テーマのデフォルトタイトルエリアを非表示 */
.blueveer_company_information {
    display: none !important;
}

.contents_ms {
    width: 95% !important;
    max-width: 1200px !important;
}

/* ===================================================
   ヘッダーエリア（未来ケアナビ仕様 ＋ WP改行バグ対策）
   =================================================== */
.e-record-head-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1200px !important;
    padding: 40px 0 10px !important;
    margin: 0 auto 0 !important;
    position: static !important;
    transform: none !important;
    border-bottom: none !important;
}

/* タイトルを左端に固定し、バナーを自動的に右端へ押し出す設定 */
.e-record-head-menu h1 {
    font-size: 32px !important;
    margin: 0 auto 0 0 !important;
    align-self: center !important;
}

.e-record-head-menu .banner {
    width: auto !important;
    max-width: 130px !important;
    height: auto !important;
    text-decoration: none !important;
    margin: 0 0 0 auto !important;
    align-self: center !important;
}

.e-record-head-menu .banner img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

.e-record-title-ex {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto 40px !important;
    padding: 0px 0 20px !important;
    border-bottom: 1px solid #ddd !important;
}

.e-record-head-menu > p,
.e-record-head-menu > br {
    display: contents !important;
}


/* ===================================================
   最下部ボタンメニュー
   =================================================== */
.e-record-btnWrap,
.e-record-btnwrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 40px auto 0 !important;
    padding: 0 !important;
}

/* ボタンやリンク of 途中で自動改行が入るのを防ぐ */
.e-record-btnWrap a,
.e-record-btnwrap a {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

.e-record-btnWrap p,
.e-record-btnwrap p {
    display: contents !important; /* pタグを無効化して中身を直結 */
}
.e-record-btnWrap br,
.e-record-btnwrap br {
    display: none !important; /* 自動改行を非表示 */
}

/* 中央の「一覧に戻る」ボタン */
.e-record-btn {
    display: inline-block !important;
    border: 1px solid #ddd !important;
    padding: 12px 16px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    color: #333 !important;
    background-color: #fff !important;
    transition: background-color 0.2s, border-color 0.2s !important;
}
.e-record-btn:hover {
    background-color: #f5f5f5 !important;
    border-color: #bbb !important;
}


/* ===================================================
   スマートフォンのレスポンシブ対応（767px以下）
   =================================================== */
@media screen and (max-width: 767px) {
    .e-record-head-menu h1 {
        font-size: 24px !important;
    }

    .e-record-head-menu .banner {
        max-width: 100px !important;
        margin-top: 10px !important;
    }

    /* スマホ表示時はメニューボタンを縦並びにして押しやすくする */
    .e-record-btnWrap,
    .e-record-btnwrap {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .arrow-link.prev,
    .arrow-link.next {
        justify-content: center !important;
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* ===================================================
   共通見出しスタイル
   =================================================== */
.e-record-flowBox h2 {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
    text-align: left !important;
    padding: 0 !important;
    scroll-margin-top: 110px !important;
    line-height: 1.3 !important;
}

.e-record-flowBox:first-child h2 {
    margin-top: 0px !important;
}

.e-record-flowBox p {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.e-record-flowImage {
    margin-top: 16px !important;
    margin-bottom: 24px !important;
}

.e-record-flowImage img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
}

/* ===================================================
   マニュアル一覧グリッド
   =================================================== */
.e-record-grid {
    display: grid !important;
    gap: 20px !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    padding: 0 !important;
}

.e-record-item {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
}

.e-record-item a {
    display: flex !important;
    align-items: center !important;
    padding: 20px !important;
    width: 100% !important;
    text-decoration: none !important;
    color: #333 !important;
}

.e-record-item.disabled a {
    pointer-events: none !important;
    opacity: 0.5 !important;
}

/* ===================================================
   【レスポンシブ】スマホ表示対応
   =================================================== */
@media screen and (max-width: 767px) {
    .contents_ms {
        width: 90% !important;
        margin-top: 100px !important;
    }

    .e-record-head-menu h1 {
        font-size: 24px !important;
    }

    .e-record-head-menu .right_col {
        flex-direction: row !important;
        gap: 10px !important;
        width: 100% !important;
        align-items: center !important;
        margin-top: 15px !important;
    }

    .e-record-head-menu .banner {
        max-width: 100px !important;
    }

    .e-record-flowBox h2 {
        font-size: 18px !important;
        margin-top: 44px !important;
        margin-bottom: 16px !important;
    }

    .e-record-flowBox:first-child h2 {
        margin-top: 10px !important;
    }

    .e-record-item a {
        font-size: 14px !important;
    }

    .e-record-btnWrap,
    .e-record-btnwrap {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
    }

    .arrow-link {
        width: 100% !important;
        justify-content: center !important;
    }

    .e-record-btn {
        width: 80% !important;
        text-align: center !important;
        order: -1 !important;
    }
}

/* ===================================================
   e-Recordでできること
   =================================================== */
.e-record-feature-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.e-record-accordion {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    margin-bottom: 10px;
}

.e-record-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    cursor: pointer;
    list-style: none;
}
.e-record-summary::-webkit-details-marker {
    display: none;
}

.e-record-summary-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.e-record-content-badge {
    width: 44px;
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 8px;
    flex-shrink: 0;
}

.e-record-summary-text h3 {
    font-size: 20px;
    color: #4a74cd;
    margin: 0 0 6px 0 !important;
}
.e-record-summary-text p {
    font-size: 13px;
    color: #333;
    margin: 0 !important;
}

.e-record-arrow-icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.e-record-arrow-icon::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #aaa;
    border-bottom: 2px solid #aaa;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

details[open] .e-record-arrow-icon::before {
    transform: rotate(-135deg);
    top: 11px;
}

.e-record-details-content {
    background-color: #fff;
    padding: 0 24px 24px 24px;
}

.e-record-child-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.e-record-child-item {
    background-color: #e8ecef;
    padding: 16px 20px 16px 44px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    position: relative;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.e-record-child-item::before {
    content: "";
    position: absolute;
    left: 22px;
    width: 0;
    height: 0;
    border-left: 7px solid #4a74cd;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-child-grid {
        grid-template-columns: 1fr;
    }
    .e-record-summary {
        padding: 16px;
    }
    .e-record-summary-inner {
        gap: 12px;
    }
    .e-record-content-badge {
        width: 36px;
        height: 36px;
    }
    .e-record-summary-text h3 {
        font-size: 16px;
    }
    .e-record-details-content {
        padding: 0 16px 16px 16px;
    }
}

/* ===================================================
   基本画面構成
   =================================================== */
.e-record-structure-content {
    margin-bottom: 40px;
}

.e-record-lead-text {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 24px;
    color: #333;
}

.e-record-list-container {
    margin-bottom: 30px;
}
.e-record-structure-list,
.e-record-structure-list .sub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.e-record-structure-list > li {
    margin-bottom: 12px;
    font-size: 15px;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    line-height: 1.6;
}
.e-record-structure-list .sub-list {
    width: 100%;
    padding-left: 24px;
    margin-top: 12px;
}
.e-record-structure-list .sub-list > li {
    margin-bottom: 12px;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.e-record-structure-list .list-title {
    font-weight: bold;
    width: 240px;
    flex-shrink: 0;
    display: inline-block;
}
.e-record-structure-list .list-title label {
    color: #333;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}
.e-record-structure-list .list-title label:hover {
    text-decoration: underline;
}
.e-record-structure-list .list-desc {
    color: #333;
}

.e-record-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.e-record-gallery-item label {
    display: block !important;
    position: relative !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background-color: #f9f9f9 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    cursor: pointer !important;
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
    height: auto !important;
}
.e-record-gallery-item label:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.e-record-gallery-item img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top left !important;
}

.e-record-gallery-item .num-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #ccc;
    z-index: 2;
}

.e-record-modal-state {
    display: none !important;
}

.e-record-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999 !important;
    justify-content: center;
    align-items: center;
    padding: 24px !important;
    box-sizing: border-box !important;
}

#modal-trigger-01:checked ~ .modal-01-target,
#modal-trigger-02:checked ~ .modal-02-target,
#modal-trigger-03:checked ~ .modal-03-target,
#modal-trigger-04:checked ~ .modal-04-target {
    display: flex !important;
}

.e-record-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background-color: rgba(0, 0, 0, 0.75);
    cursor: pointer;
    z-index: 1;
}

.e-record-modal-content {
    position: relative;
    max-width: 960px;
    width: 100%;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    z-index: 2;
    box-sizing: border-box !important;
}
.e-record-modal-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.e-record-modal-content .e-record-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: #4a5568;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 3;
}
.e-record-modal-content .e-record-modal-close:hover {
    background: #2d3748;
}

.e-record-structure p:has(.e-record-modal-state) {
    display: none !important;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .e-record-structure-list .list-title {
        width: 100%;
        min-width: 0;
        margin-bottom: 2px;
    }
    .e-record-structure-list .sub-list {
        padding-left: 12px;
    }

    .e-record-modal {
        padding: 16px !important;
    }
    .e-record-modal-content {
        width: 100% !important;
    }

    .e-record-modal-content .e-record-modal-close {
        top: 12px !important;
        right: 12px !important;
    }
}

/* ===================================================
   患者管理
   =================================================== */
.e-record-manage-patient .e-record-flow-comment {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    text-align: left;
    width: 100%;
    max-width: 800px;
}

.e-record-manage-patient .e-record-flex-container {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-top: 12px;
}

.e-record-manage-patient .e-record-flex-container .e-record-flowImage {
    flex: 0 0 45%;
    max-width: 400px;
}

.e-record-manage-patient .e-record-flex-text {
    flex: 1;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    text-align: left;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-manage-patient .e-record-flex-container {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .e-record-manage-patient .e-record-flex-container .e-record-flowImage {
        width: 100%;
        max-width: 100%;
    }
    .e-record-manage-patient .e-record-flex-text {
        width: 100%;
    }
}


/* ===================================================
   操作アイコン詳細
   =================================================== */
.e-record-icon-detail .e-record-tool-detail {
    margin-top: 24px !important;
}

/* 1. カテゴリごとの適切な余白（コンテンツ同士の余白） */
.e-record-icon-detail .tool-category {
    margin-bottom: 40px !important;
}
.e-record-icon-detail .tool-category:last-child {
    margin-bottom: 0 !important;
}

/* 2. カテゴリ見出しの強弱（視覚的フック） */
.e-record-icon-detail .category-title {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
    border-left: 4px solid #4a74cd !important;
    padding-left: 8px !important;
    margin-bottom: 16px !important;
    line-height: 1.4 !important;
}

/* 3. 【整列】PC表示時は2列グリッドにして縦の長さを抑え、スキャンしやすくする */
@media screen and (min-width: 768px) {
    .e-record-icon-detail .tool-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px 32px !important; /* 行間16px、列間32px */
    }
}

/* 4. アイコンとテキストの垂直ラインをピシッと整列（Alignment） */
.e-record-icon-detail .tool-list li {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 0 !important; /* グリッドのgapに任せる */
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

/* 5. アイコンのサイズ枠を固定し、文字の開始位置を完璧に揃える */
.e-record-icon-detail .tool-icon {
    flex: 0 0 32px !important;
    width: 32px !important;
    height: 32px !important;
    margin-right: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f5f7fa !important; /* 背景色でアイコン単体を明瞭化 */
    border-radius: 6px !important;
    padding: 6px !important;
    box-sizing: border-box !important;
}
.e-record-icon-detail .tool-icon svg {
    width: 100% !important;
    height: auto !important;
}

/* 6. ラベル部分の強弱 */
.e-record-icon-detail .tool-list li strong {
    font-weight: bold !important;
    color: #333 !important;
    white-space: nowrap !important;
}

/* ===================================================
   患者文書閲覧メニュー専用)
   =================================================== */
.e-record-alert-notice {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
    width: 100%;
}
.e-record-alert-notice p {
    color: #ff4d4d;
    font-weight: bold;
    font-size: 16px;
    margin: 0 !important;
    line-height: 1.5;
}

.e-record-doc-menu .e-record-flex-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 12px;
}

.e-record-doc-menu .e-record-flex-container .e-record-flowImage {
    flex: 0 0 45%;
    max-width: 450px;
}

.e-record-doc-menu .e-record-flex-text {
    flex: 1;
    text-align: left;
}

.e-record-doc-menu .e-record-flex-text h3 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 0;
    margin-bottom: 12px !important;
}

.e-record-doc-menu .e-record-flex-text p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 8px !important;
}

.e-record-doc-menu .e-record-flex-text p strong {
    color: #333 !important;
}

.e-record-doc-menu .e-record-flex-text .sub-note {
    font-size: 14px;
    color: #555;
    margin-bottom: 4px !important;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-doc-menu .e-record-flex-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .e-record-doc-menu .e-record-flex-container .e-record-flowImage {
        width: 100%;
        max-width: 100%;
    }
    .e-record-doc-menu .e-record-flex-text {
        width: 100%;
    }
    .e-record-doc-menu .e-record-flex-text h3 {
        font-size: 18px;
    }
    .e-record-alert-notice p {
        font-size: 14px;
    }
}

/* ===================================================
   テンプレート管理
   =================================================== */
.e-record-template .e-record-flowBox p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    text-align: left;
    margin: 0 !important;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-template .e-record-flowBox p {
        font-size: 14px;
    }
}

/* ===================================================
   患者の自動登録
   =================================================== */
.e-record-auto-register p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 10px !important;
}

.e-record-auto-register .procedure-indent {
    font-weight: bold;
    margin-bottom: 15px !important;
}
.e-record-auto-register .procedure-group {
    padding-left: 10px;
}
.e-record-auto-register .procedure-group p {
    margin-bottom: 8px !important;
}

.install-step-box {
    margin-top: 24px;
    text-align: left;
}
.e-record-auto-register .e-record-flex-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.e-record-auto-register .icon-sub-image img {
    max-width: 550px !important;
    width: 100%;
    height: auto;
}

.e-record-auto-register strong {
    font-weight: bold;
}
.e-record-auto-register .important-text {
    color: #ff4d4d;
}

.e-record-auto-register .procedure-group a {
    color: #333 !important;
    text-decoration: underline !important;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-auto-register .e-record-flex-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===================================================
   推奨環境
   =================================================== */
.e-record-environment h1 {
    color: #ff4d4d !important;
}

.e-record-env-container {
    margin-bottom: 40px;
    text-align: left;
}

.e-record-env-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.e-record-env-card,
.e-record-env-wide-card {
    border: 2px solid #2b4c7e;
    border-radius: 28px;
    padding: 30px;
    background-color: #fff;
}

.e-record-env-card h3,
.e-record-env-wide-card h3 {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px !important;
}

.e-record-env-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.e-record-env-card ul li {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 6px;
}

.e-record-env-wide-card .e-record-env-flex {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.e-record-env-wide-card .e-record-flowImage {
    flex: 0 0 45%;
    max-width: 340px;
    margin: 0 !important;
}

.e-record-env-wide-card .e-record-env-text {
    flex: 1;
}
.e-record-env-wide-card .e-record-env-text p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px !important;
}

.e-record-env-wide-card .env-notice .notice-title {
    font-weight: bold;
    margin-bottom: 4px !important;
}
.e-record-env-wide-card .env-notice p {
    margin-bottom: 0 !important;
}

/* 【SP対応】 */
@media screen and (max-width: 767px) {
    .e-record-env-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .e-record-env-wide-card .e-record-env-flex {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .e-record-env-wide-card .e-record-flowImage {
        width: 100%;
        max-width: 100%;
    }
    .e-record-env-card,
    .e-record-env-wide-card {
        padding: 20px;
        border-radius: 16px;
    }
    .e-record-env-card h3,
    .e-record-env-wide-card h3 {
        font-size: 18px;
    }
    .e-record-env-card ul li {
        font-size: 14px;
    }
}

/* ===================================================
   共通レスポンシブ表示【SP対応】
   =================================================== */
@media screen and (max-width: 767px) {
    .e-record-head-menu h1 {
        font-size: 24px;
    }

    .e-record-head-menu .right_col {
        flex-direction: row;
        gap: 10px;
    }

    .e-record-head-menu .banner {
        max-width: 100px;
    }

    .e-record-index .e-record-grid {
        grid-template-columns: 1fr;
    }

    .e-record-item a {
        font-size: 14px;
    }
}

/* ===================================================
   一覧ページ
   =================================================== */
@media screen and (min-width: 768px) {
    .e-record-index .e-record-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.e-record-index .e-record-item a {
    font-weight: bold !important;
    color: #333 !important;
    text-decoration: none !important;
}

.e-record-index .e-record-item.alert a {
    color: #ff4d4d !important;
}