/* 人とAIの役割 */
.ae-ai__role-flow {
    background-color: #f8fbff;
    background-image: radial-gradient(circle, #dfeafa 6px, transparent 7px);
    background-size: 32px 32px;
    box-shadow: 0 10px 24px #14357020;
}

.ae-ai__role-flow .ae-ai__switches--roles {
    grid-template-columns: 130px repeat(5, minmax(0, 1fr));
    grid-template-rows: 18px 24px 104px 24px 104px;
    gap: 8px 20px;
    margin: 0;
    padding: 20px;
    background: transparent;
}

.ae-ai__role-flow .ae-ai__switches--roles::before,
.ae-ai__role-flow .ae-ai__switches--roles::after {
    grid-column: 1;
    display: grid;
    place-content: center;
    box-shadow: 0 3px 8px #14357012;
    border-radius: 6px;
    background: #edf5ff;
    color: #143570;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    white-space: pre-line;
}

.ae-ai__role-flow .ae-ai__switches--roles::before {
    content: "AIが進める";
    grid-row: 3;
    background: #cfe3ff;
    color: #24589e;
}
.ae-ai__role-flow .ae-ai__switches--roles::after {
    content: "開発者が\A確認・判断";
    grid-row: 5;
    background: #dbe4f2;
    color: #344866;
}

.ae-ai__role-flow .ae-ai__switches--roles button[aria-pressed] {
    grid-template-rows: 18px 24px 104px 24px 104px;
    grid-row: 1 / -1;
    gap: 8px;
    align-content: start;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: #fff;
    color: #143570;
    outline: 1px solid #c9d9f3;
    outline-offset: 4px;
    box-shadow: 0 0 0 4px #fff, 0 4px 10px #14357014;
}

.ae-ai__role-number {
    font: 700 12px/1.5 "Courier New", monospace;
}

.ae-ai__role-flow .ae-ai__role-task {
    display: grid;
    align-content: center;
    gap: 4px;
    border: 1px solid #d9e5f7;
    border-radius: 6px;
    padding: 8px 6px;
    background: #eef2f8;
    color: #143570;
    box-shadow: 0 2px 5px #1435700d;
}

.ae-ai__role-flow .ae-ai__role-task--ai {
    background: #dcecff;
    border-color: #a8caff;
    color: #064bfa;
}

.ae-ai__role-task small { display: none; }
.ae-ai__role-task b { font-size: 16px; line-height: 1.5; }

.ae-ai__role-flow .ae-ai__role-arrow {
    color: #064bfa;
    font-size: 22px;
    line-height: 1;
}

.ae-ai__role-flow .ae-ai__role-more {
    display: none;
}

.ae-ai__role-flow .ae-ai__switches--roles button[aria-pressed="true"] {
    background: #eef4ff;
    color: #064bfa;
    outline: 2px solid #064bfa;
    outline-offset: 4px;
    box-shadow: 0 0 0 4px #eef4ff, 0 5px 16px #064bfa26;
}

.ae-ai__role-flow .ae-ai__switches--roles button[aria-pressed="false"]:hover {
    background: #f6f9ff;
    outline-color: #8fb1f5;
    box-shadow: 0 0 0 4px #f6f9ff, 0 6px 14px #1435701c;
}

.ae-ai__role-flow .ae-ai__switches--roles button[aria-pressed]:focus-visible {
    outline: 3px solid #143570;
    outline-offset: 8px;
}

@media (max-width: 700px) {
    .ae-ai__role-flow .ae-ai__switches--roles {
        grid-template-columns: 110px repeat(5, minmax(150px, 1fr));
        overflow-x: auto;
        padding: 14px;
    }
}

.ae-ai__role-panel {
    border: 0;
    border-top: 1px solid #bad2ff;
    border-radius: 0;
    padding: 24px 28px;
    background: #f0f6ff;
    box-shadow: none;
}

.ae-ai__role-panel + .ae-ai__role-panel {
    margin-top: 16px;
}

.ae-ai__role-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.ae-ai__role-columns > div {
    min-width: 0;
    border: 1px solid #c5d9ff;
    border-top: 3px solid #064bfa;
    border-radius: 6px;
    padding: 18px 20px;
    background: #fff;
    box-shadow: 0 3px 8px #064bfa0a;
}

.ae-ai__role-columns > div:last-child {
    border-top-color: #143570;
}

.ae-ai__role-columns p {
    margin: 12px 0 0;
}

.ae-ai__badge {
    display: inline-block;
    min-width: 48px;
    border-radius: 20px;
    padding: 2px 14px;
    background: var(--ai-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.ae-ai__badge--human {
    background: #143570;
}

/* 開発ガイド */
#ai-guide {
    margin: clamp(36px, 5vw, 64px) auto;
    border: 2px solid #064bfa;
    border-radius: 8px;
    padding: 4px;
    background: #fff;
    box-shadow: 5px 5px 0 #a9d6ff;
}

.ae-ai__guide-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 3px 3px 0 0;
    padding: 10px 12px;
    background: #064bfa;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.ae-ai__guide-bar > span:last-child {
    flex-shrink: 0;
    font: 12px/1 "Courier New", monospace;
}

.ae-ai__guide-body {
    padding: clamp(20px, 3vw, 40px);
    background: linear-gradient(145deg, #fff 45%, #eef5ff);
}

.ae-ai__guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr);
    align-items: start;
    gap: 36px;
}

.ae-ai__book {
    position: relative;
    min-height: 420px;
    margin: 24px 12px;
    border: 1px solid #c4d3eb;
    border-left: 14px solid #d5e6ff;
    border-radius: 2px 6px 6px 2px;
    padding: 32px 24px;
    background:
        linear-gradient(
            to bottom,
            #fff 0%,
            #fff 72%,
            #064bfa 72%,
            #064bfa 100%
        );
    box-shadow:
        8px 8px 0 #e4eaf3,
        12px 16px 24px rgba(8, 11, 32, 0.16);
    transform: rotate(-4deg);
}

.ae-ai__book-brand {
    display: block;
    margin-bottom: 24px;
    font: 700 24px/1.2 Arial, sans-serif;
    letter-spacing: -0.05em;
}

.ae-ai .ae-ai__book h3 {
    margin-bottom: 20px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.35;
}

.ae-ai__book > p {
    font-size: 13px;
}

.ae-ai__book-pages {
    position: absolute;
    right: 20px;
    bottom: 50px;
    border-radius: 20px;
    padding: 4px 14px;
    background: #fff;
    color: var(--ai-blue);
    font-size: 13px;
    font-weight: 700;
}

.ae-ai__book > small {
    position: absolute;
    bottom: 18px;
    left: 24px;
    color: #fff;
    font-size: 10px;
}

/* ガイドの紹介：PDFリーダーに代わる入口 */
.ae-ai__guide-teaser { min-width: 0; padding: clamp(12px, 2vw, 28px); }
.ae-ai .ae-ai__guide-teaser h3 { font-size: clamp(24px, 2.5vw, 34px); line-height: 1.5; }
.ae-ai__guide-topics { display: grid; gap: 12px; padding: 0; list-style: none; }
.ae-ai__guide-topics li { border: 1px solid #bfd4fa; border-radius: 6px; padding: 14px 18px; background: #fff; box-shadow: 3px 3px 0 #dceaff; }
.ae-ai__guide-topics span { display: block; margin-bottom: 4px; color: #064bfa; font: 700 12px/1.6 "Courier New", monospace; }
.ae-ai__guide-topics strong { font-size: 16px; }
.ae-ai-page.is-ai-guide-open { overflow: hidden; }
#ai-guide-detail [hidden] { display: none !important; }
.ae-ai__guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.ae-ai__guide-steps button,
.ae-ai__guide-paging button { min-height: 44px; border: 1px solid #9bbdf8; border-radius: 6px; padding: 10px 12px; background: #fff; color: #064bfa; font: inherit; font-weight: 700; cursor: pointer; }
.ae-ai__guide-steps button[aria-pressed="true"] { background: #064bfa; color: #fff; border-color: #064bfa; box-shadow: 3px 3px 0 #a9d6ff; }
.ae-ai__guide-position { color: #345681; font-size: 13px !important; }
.ae-ai__guide-topic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    grid-template-rows: repeat(3, min-content) 1fr;
    align-items: start;
    column-gap: 28px;
    border: 1px solid #bfd4fa;
    border-radius: 8px;
    padding: clamp(18px, 3vw, 28px);
    background: #fff;
    box-shadow: 4px 4px 0 #dceaff;
}

.ae-ai__guide-topic > :not(.ae-ai__guide-paper) {
    grid-column: 1;
}

.ae-ai__guide-paper {
    grid-column: 2;
    grid-row: 1 / span 4;
    min-width: 0;
    margin: 0;
}

.ae-ai__guide-paper a {
    display: block;
}

.ae-ai__guide-paper img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #c4d6ef;
    background: #fff;
    box-shadow: 3px 5px 12px #17385e18;
}

.ae-ai__guide-paper figcaption {
    margin-top: 10px;
    color: #345681;
    font-size: 12px;
    line-height: 1.7;
}
.ae-ai .ae-ai__guide-topic h3 { margin-top: 0; font-size: clamp(22px, 2.5vw, 28px); line-height: 1.5; }
.ae-ai__guide-learning { border-left: 3px solid #064bfa; padding: 12px 16px; background: #edf5ff; }
.ae-ai__guide-paging { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.ae-ai__guide-paging button:disabled { opacity: .45; cursor: default; }
.ae-ai__guide-invite { margin-top: 28px; border-top: 1px solid #bfd4fa; padding-top: 20px; }
.ae-ai__guide-source { margin-top: 24px; color: #345681; font-size: 13px; }
.ae-ai__guide-source summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
.ae-ai__guide-source a { color: #064bfa; text-underline-offset: 4px; }
#ai-guide-download { scroll-margin-top: calc(var(--ai-nav-admin-offset, 0px) + 90px); }
.ae-ai__guide-steps button:focus-visible,
.ae-ai__guide-paging button:focus-visible,
.ae-ai__guide-source summary:focus-visible,
#ai-guide-download:focus-visible { outline: 3px solid #064bfa; outline-offset: 4px; }
@media (max-width: 780px) {
    .ae-ai__guide-steps {
        grid-template-columns: 1fr;
    }

    .ae-ai__guide-teaser {
        padding-inline: 0;
    }

    .ae-ai__guide-topic {
        grid-template-columns: minmax(0, 1fr);
    }

/* 試し読み：説明と紙面をひとつの展示として見せる */
.ae-ai__guide-topic {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
    grid-template-areas:
        "label paper"
        "title paper"
        "intro paper"
        "learn paper"
        ".     paper";
    grid-template-rows: repeat(4, max-content) 1fr;
    gap: 20px 32px;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid #a9c7ff;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px #17385e12;
}

.ae-ai__guide-topic > :not(.ae-ai__guide-paper) {
    min-width: 0;
    align-self: start;
    margin: 0;
}

.ae-ai .ae-ai__guide-topic > .ae-ai__eyebrow {
    grid-area: label;
    justify-self: start;
    padding: 7px 12px;
    border: 1px solid #064bfa;
    border-radius: 4px;
    background: #edf4ff;
    color: #064bfa;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.ae-ai .ae-ai__guide-topic > h3 {
    grid-area: title;
    margin: 0;
    color: #092f76;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

.ae-ai .ae-ai__guide-topic > p:not([class]) {
    grid-area: intro;
    margin: 0;
    color: #34506f;
    font-size: 15px;
    line-height: 1.95;
}

.ae-ai .ae-ai__guide-topic > .ae-ai__guide-learning {
    grid-area: learn;
    margin: 4px 0 0;
    padding: 18px 20px;
    border: 0;
    border-top: 3px solid #064bfa;
    border-radius: 0 0 8px 8px;
    background: #edf4ff;
    color: #183f73;
    font-size: 14px;
    line-height: 1.85;
}

.ae-ai__guide-learning strong {
    display: inline-block;
    margin-bottom: 6px;
    color: #064bfa;
}

/* 紙面を置く展示台 */
.ae-ai__guide-paper {
    grid-area: paper;
    min-width: 0;
    margin: 0;
    padding: clamp(14px, 2vw, 24px);
    border: 1px solid #c5d9ff;
    border-radius: 10px;
    background-color: #eaf2ff;
    background-image:
        linear-gradient(#064bfa0c 1px, transparent 1px),
        linear-gradient(90deg, #064bfa0c 1px, transparent 1px);
    background-size: 20px 20px;
}

.ae-ai__guide-paper::before {
    content: "INSIDE THE GUIDE / SAMPLE";
    display: block;
    margin-bottom: 14px;
    color: #315b9a;
    font: 700 10px/1.6 "Courier New", monospace;
    letter-spacing: .1em;
}

.ae-ai__guide-paper a {
    display: block;
    cursor: zoom-in;
    border-radius: 2px;
}

.ae-ai__guide-paper a:focus-visible {
    outline: 3px solid #064bfa;
    outline-offset: 5px;
}

.ae-ai__guide-paper img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    border: 1px solid #c4d6ef;
    background: #fff;
    box-shadow: 0 8px 20px #163b7526;
}

.ae-ai__guide-paper figcaption {
    margin-top: 14px;
    color: #315b9a;
    font-size: 12px;
    line-height: 1.7;
}

/* テーマ送り */
.ae-ai__guide-paging {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.ae-ai__guide-paging button:disabled {
    opacity: .45;
    cursor: default;
}

/* 続きを読みたくなる、実験室風の案内 */
.ae-ai__guide-invite {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 32px;
    padding: clamp(26px, 4vw, 48px);
    border: 1px solid #064bfa;
    border-radius: 14px;
    background-color: #064bfa;
    background-image:
        linear-gradient(#ffffff16 1px, transparent 1px),
        linear-gradient(90deg, #ffffff16 1px, transparent 1px),
        radial-gradient(ellipse at top right, #37a8ff, transparent 65%);
    background-size: 28px 28px, 28px 28px, 100% 100%;
    color: #fff;
    box-shadow: 6px 6px 0 #a9caff;
}

.ae-ai__guide-invite::before {
    content: "NEXT / YOUR TURN";
    display: block;
    margin-bottom: 16px;
    color: #d8f3ff;
    font: 700 12px/1.6 "Courier New", monospace;
    letter-spacing: .14em;
}

.ae-ai__guide-invite::after {
    content: "↗";
    position: absolute;
    z-index: -1;
    right: 12px;
    bottom: -52px;
    color: #ffffff16;
    font: 700 260px/1 sans-serif;
    pointer-events: none;
}

.ae-ai .ae-ai__guide-invite h3 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.04em;
}

.ae-ai .ae-ai__guide-invite p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #eef6ff;
    font-size: 15px;
    line-height: 1.9;
}

.ae-ai .ae-ai__guide-invite .ae-ai__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 24px;
    border: 2px solid #f5ff75;
    border-radius: 6px;
    background: #f5ff75;
    color: #093073;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    box-shadow: 4px 4px 0 #002b9c;
}

.ae-ai .ae-ai__guide-invite .ae-ai__button:hover {
    background: #fff;
    border-color: #fff;
    color: #064bfa;
}

/* 既存の見本PDFリンクと受付案内 */
.ae-ai__guide-source {
    margin-top: 24px;
    color: #345681;
    font-size: 13px;
}

.ae-ai__guide-source summary {
    min-height: 44px;
    padding-block: 10px;
    cursor: pointer;
}

.ae-ai__guide-source a {
    color: #064bfa;
    text-underline-offset: 4px;
}

#ai-guide-download {
    scroll-margin-top: calc(var(--ai-nav-admin-offset, 0px) + 90px);
}

.ae-ai__guide-steps button:focus-visible,
.ae-ai__guide-paging button:focus-visible,
.ae-ai__guide-source summary:focus-visible,
#ai-guide-download:focus-visible {
    outline: 3px solid #064bfa;
    outline-offset: 4px;
}

.ae-ai__guide-invite .ae-ai__button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 5px;
}

@media (max-width: 780px) {
    .ae-ai__guide-steps {
        grid-template-columns: 1fr;
    }

    .ae-ai__guide-teaser {
        padding-inline: 0;
    }

    .ae-ai__guide-topic {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "label"
            "title"
            "intro"
            "learn"
            "paper";
        grid-template-rows: repeat(5, auto);
        gap: 18px;
        padding: 20px 16px;
    }

    .ae-ai__guide-paper {
        grid-area: paper;
        box-sizing: border-box;
        width: min(100%, 460px);
        margin: 6px auto 0;
    }

    .ae-ai__guide-invite {
        padding: 28px 22px;
    }

    .ae-ai .ae-ai__guide-invite .ae-ai__button {
        width: 100%;
        padding-inline: 12px;
    }
}
}


.ae-ai__download {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr;
    align-items: center;
    gap: 32px;
    margin-top: 40px;
    border: 1px solid #c0d3f3;
    border-radius: 8px;
    padding: 28px 32px;
    background: #eaf2ff;
    box-shadow: 4px 4px 0 #d3e3fa;
}

.ae-ai__download p:last-child {
    margin-bottom: 0;
}

.ae-ai__pending {
    color: var(--ai-blue);
    font-weight: 700;
}

