/* ============================================================
   資料DL の共通の見た目（お役立ち資料の一覧 resources.html・資料ページ resource-*.html・まとめてダウンロード download.html）
   フォームの部品・資料のカード・資料を選ぶ行・資料ページの組み
   ============================================================ */
[hidden] { display: none !important; }

/* ---- フォーム（download.html・資料ページ共通） ---- */
.contact-form-container {
    max-width: 640px;
    margin: 0 auto;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 2.5rem 2rem;
}
.form-group {
    margin-bottom: 1.4rem;
}
.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}
.form-group label .req,
.dl-pick legend .req {
    color: var(--btn-green);
    margin-left: 4px;
    font-size: 0.78rem;
}
.form-group label .opt,
.dl-extra legend .opt {
    color: #999;
    margin-left: 4px;
    font-size: 0.78rem;
    font-weight: 400;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s;
    appearance: none;
    line-height: 1.475;   /* 書体まかせ（normal）にせず、入力欄の高さを 44px にそろえる */
}
.form-group select {
    background-image: 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='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.2rem;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00d084;
}
@media (max-width: 768px) {
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select {
        font-size: 16px; /* iOS の拡大を防ぐ */
        line-height: 1.5;
    }
}
.form-group input::placeholder {
    color: #bbb;
}
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 1.6rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #444;
}
/* チェックボックス（同意・資料の選択で共通） */
.form-consent input[type="checkbox"],
.dl-doc-check {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    border: 1.5px solid #cfd6d2;
    border-radius: 4px;
    background: #ffffff;
    display: inline-grid;
    place-content: center;
    flex-shrink: 0;
    cursor: pointer;
}
.form-consent input[type="checkbox"]:checked,
.dl-doc-check:checked {
    background: var(--btn-green);
    border-color: var(--btn-green);
}
.form-consent input[type="checkbox"]:checked::after,
.dl-doc-check:checked::after {
    content: '';
    width: 10px;
    height: 5px;
    border-left: 2.5px solid #ffffff;   /* チェック印は白 */
    border-bottom: 2.5px solid #ffffff;
    transform: rotate(-45deg) translateY(-1px);
}
.dl-doc-check:disabled { cursor: default; }   /* JS が動かない時は既定の資料のまま選べない */
.dl-doc-check:focus-visible,
.form-consent input[type="checkbox"]:focus-visible {
    outline: 2px solid #00d084;
    outline-offset: 2px;
}
.form-consent a {
    color: #0F2D5E;
    text-decoration: underline;
}
.form-consent .req {
    color: var(--btn-green);
    margin-left: 2px;
}
.btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--btn-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.btn-submit:hover { background: var(--btn-green-hover); }
.btn-submit:disabled { opacity: 0.6; cursor: default; }
.form-note {
    font-size: 0.78rem;
    color: #999;
    text-align: left;
    line-height: 1.7;
}
.form-error {
    display: none;
    background: #fee;
    color: #c53030;
    border-radius: 6px;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 1rem;
}

/* ---- 資料を選ぶ行（download.html） ---- */
.dl-pick {
    border: 0;
    padding: 0;
    margin: 0 0 1.8rem;
    min-width: 0;
}
.dl-pick legend {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    padding: 0;
    margin-bottom: 0.6rem;
}
.dl-pick-row {
    display: grid;
    grid-template-columns: 18px 132px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "chk thumb title"
        "chk thumb points"
        "chk thumb meta";
    column-gap: 12px;
    padding: 1rem;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 0.7rem;
    transition: border-color 0.2s, background 0.2s;
}
.dl-pick-row:has(.dl-doc-check:checked) {
    border-color: #3a9e60;
    background: #f4faf6;
}
.dl-pick-row .dl-doc-check { grid-area: chk; margin-top: 3px; }
.dl-pick-thumb {
    grid-area: thumb;
    cursor: pointer;
}
.dl-pick-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    background: #ffffff;
}
.dl-pick-title {
    grid-area: title;
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1a1a1a;
    cursor: pointer;
    margin-bottom: 0.35rem;
}
.dl-pick-points {
    grid-area: points;
    list-style: none;
    padding: 0;
    margin: 0 0 0.35rem;
}
.dl-pick-meta {
    grid-area: meta;
    font-size: 0.76rem;
    color: #767676;
    line-height: 1.6;
}
.dl-pick-more {
    color: #2e7d4f;
    font-weight: 700;
    margin-left: 0.7rem;
    text-decoration: underline;
}
.dl-pick-error {
    color: #c53030;
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 0.2rem 0 0;
}
@media (max-width: 600px) {
    .dl-pick-row {
        grid-template-columns: 18px 96px minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas:
            "chk thumb title"
            "chk points points"
            "chk meta meta";
        padding: 0.9rem 0.8rem;
    }
    .dl-pick-points { margin-top: 0.6rem; }
}
/* 題名の欄が表紙の横で狭く、題名の半分（11字）が1行に入らない幅では、読点の後の改行を効かせず文節で折る */
@media (max-width: 420px) {
    .dl-pick-title br { display: none; }
}

/* 点つきの箇条書き（要点・この資料でわかること・こんな方に） */
.dl-dots {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dl-dots li,
.dl-pick-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.86rem;
    color: #444;
    line-height: 1.6;
    padding: 0.2rem 0;
}
.dl-pick-points li { font-size: 0.8rem; padding: 0.1rem 0; }
.dl-dots li::before,
.dl-pick-points li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #3a9e60;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.55em;
}

/* ---- あわせてダウンロードする資料（資料ページのフォーム） ---- */
.dl-extra {
    border: 0;
    padding: 0;
    margin: 0 0 1.6rem;
    min-width: 0;
}
.dl-extra legend {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    padding: 0;
    margin-bottom: 0.4rem;
}
.dl-extra-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border: 1.5px solid #e5e5e5;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.dl-extra-row:has(.dl-doc-check:checked) {
    border-color: #3a9e60;
    background: #f4faf6;
}
.dl-extra-row small {
    display: block;
    font-size: 0.76rem;
    color: #767676;
}

/* ---- 資料ページの組み ---- */
.dl-page {
    max-width: 1000px;
    margin: 0 auto;
}
/* nav 要素は style.css で flex になるため、長いパンくずがスマホで語の途中から縦に崩れないよう普通の行にする */
.dl-page .page-breadcrumbs { display: block; }
/* 対応するブラウザでは文節で折り返す（語の途中で行を分けない） */
.dl-page .page-breadcrumbs,
.dl-title-lead,
.dl-intro-small,
.dl-intro-note,
.dl-dots li,
.dl-pick-title,
.dl-pick-points li,
.dl-extra-row,
.dl-sample figcaption,
.dl-res-desc,
.dl-res-sub {
    word-break: auto-phrase;
}
.dl-title {
    max-width: 760px;
    margin: 0 auto 2.2rem;
    text-align: center;
}
.dl-title-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2e7d4f;
    background: #ffffff;
    border: 1.5px solid #bfe0cb;
    border-radius: 999px;
    padding: 0.15rem 0.85rem;
    margin-bottom: 0.9rem;
}
.dl-title h1 {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}
.dl-title-sub {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2e7d4f;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.dl-title-lead {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.85;
}
.dl-title-cta { margin-top: 1.4rem; }
.dl-title-cta .btn-round-solid { padding: 0.9rem 2.6rem; font-size: 1rem; }
.dl-intro {
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    gap: 2.2rem;
    align-items: start;
    background: #f4faf6;
    border: 1px solid #d8ecdf;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3.2rem;
}
.dl-intro-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}
.dl-intro-img--cover {
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.dl-intro-body h2 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}
.dl-intro-body .dl-dots { margin-bottom: 1.3rem; }
.dl-intro-small {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.7;
    margin: -0.8rem 0 1.3rem;
}
.dl-intro-note {
    font-size: 0.8rem;
    color: #767676;
    line-height: 1.8;
}
.dl-head {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 1.3rem;
}
.dl-samples { margin-bottom: 3.2rem; }
/* 中のページの見本: PC は2列×2段（1枚 460px 以上）、999px 以下は1列 */
.dl-samples-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem 1.3rem;
}
@media (max-width: 999px) {
    .dl-samples-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
}
.dl-sample { margin: 0; }
.dl-sample a {
    display: block;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}
.dl-sample a:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
.dl-sample img {
    display: block;
    width: 100%;
    height: auto;
}
.dl-sample figcaption {
    font-size: 0.82rem;
    color: #444;
    line-height: 1.6;
    margin-top: 0.55rem;
}
.dl-sample-page {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2e7d4f;
    margin-right: 0.45rem;
}
.dl-samples-note {
    font-size: 0.78rem;
    color: #767676;
    text-align: center;
    margin-top: 0.9rem;
}
.dl-form-wrap { margin-bottom: 3.2rem; }
@media (max-width: 768px) {
    .dl-title h1 { font-size: 1.45rem; }
    .dl-title-sub { font-size: 0.95rem; }
    .dl-title-lead { text-align: left; font-size: 0.9rem; }
    .dl-intro {
        grid-template-columns: 1fr;
        gap: 1.3rem;
        padding: 1.3rem 1.1rem;
        margin-bottom: 2.6rem;
    }
    .dl-head { font-size: 1.15rem; }
    .dl-samples-grid { gap: 1.4rem; }
    .dl-title-cta .btn-round-solid { display: block; max-width: 340px; margin: 0 auto; text-align: center; }
    .contact-form-container { padding: 2rem 1.2rem; }
}

/* ---- 資料のカード（お役立ち資料の一覧・資料ページの「ほかの資料」） ---- */
.dl-res-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
    max-width: 1000px;
    margin: 0 auto;
}
.dl-res-grid--single {
    grid-template-columns: minmax(0, 480px);
    justify-content: center;
}
.dl-res-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}
.dl-res-thumb {
    display: block;
    background: #f4faf6;
    border-bottom: 1px solid #eeeeee;
}
.dl-res-thumb img {
    display: block;
    width: 100%;
    height: auto;
}
.dl-res-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem 1.5rem 1.6rem;
}
/* 「デモ動画つき」の印（ページ数の注記の横） */
.dl-res-tag {
    display: inline-block;
    margin-left: 0.6rem;
    vertical-align: 1px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--btn-green);
    border-radius: 3px;
    padding: 0.1rem 0.55rem;
    line-height: 1.6;
}
.dl-res-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}
.dl-res-sub {
    font-size: 0.84rem;
    font-weight: 700;
    color: #2e7d4f;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}
.dl-res-desc {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}
.dl-res-note {
    font-size: 0.78rem;
    color: #767676;
    margin-bottom: 1.1rem;
}
.dl-res-btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.8rem 2.2rem;
    font-size: 0.95rem;
    text-align: center;
}
.dl-bundle {
    max-width: 1000px;
    margin: 2rem auto 0;
    background: #f4faf6;
    border: 1px solid #d8ecdf;
    border-radius: 8px;
    padding: 1.4rem 1rem;
    text-align: center;
}
.dl-bundle .btn-round-outline { border-color: #3a9e60; color: #2e7d4f; }
/* 2枚が横に並ぶ時は題名の欄を2行分とり、題名が1行のカードと副題の高さをそろえる */
@media (min-width: 769px) {
    .dl-res-grid:not(.dl-res-grid--single) .dl-res-title { min-height: 3em; }
}
@media (max-width: 768px) {
    .dl-res-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .dl-res-grid--single { grid-template-columns: 1fr; }
    .dl-res-body { padding: 1.2rem 1.2rem 1.4rem; }
    .dl-res-btn { align-self: stretch; }
    .dl-bundle .btn-round-outline { display: block; padding: 1rem 0.8rem; font-size: 0.92rem; }
}
