/* 開発記録だけ：描けるメモの高さと案内を整理 */
#ai-record .ae-ai__hero-note {
    padding: 0;
    margin-bottom: 28px;
}

#ai-record .ae-ai__note--hero {
    min-height: 0;
    border: 0;
    padding: 48px 44px 28px;
    background: transparent
        url("../../images/ai-development/real-memo-wide-transparent.png")
        center / 100% 100% no-repeat;
    box-shadow: none;
}

/* 画像にクリップがあるので、既存のクリップを隠す */
#ai-record .ae-ai__note--hero .ae-ai__paperclip {
    display: none;
}

/* 見出しとクリップが重ならないようにする */
#ai-record .ae-ai__note--hero > .ae-ai__note-label,
#ai-record .ae-ai__note--hero > strong {
    padding-left: 100px;
}

/* メモ上の余白を縮める */
#ai-record > .ae-ai__section-heading {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px 32px;
    margin-bottom: 0;
    padding-right: 2.2%;
}

#ai-record > .ae-ai__section-heading > p {
    grid-column: 1;
}

/* メモの見出しを手書きに近い書体へ */
#ai-record .ae-ai__note--hero > strong {
    font-family: "UD デジタル 教科書体 NK",
        "YuKyokasho", cursive;
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* 描くときのボールペン */
#ai-record .ae-ai__hero-note.is-drawing .ae-ai__drawing-canvas {
    cursor: url("../../images/ai-development/memo-blue-pen-cursor.png")
        9 49, crosshair;
}

#ai-record .ae-ai__drawing-area {
    height: 260px;
    min-height: 0;
    aspect-ratio: auto;
    padding-bottom: 0;
}

/* 中央の案内を読みやすく整える */
#ai-record .ae-ai__drawing-hint {
    gap: 6px;
    color: #47617f;
    line-height: 1.6;
    transform: translateY(-6px);
}

#ai-record .ae-ai__drawing-hint small {
    margin: 0;
    color: #56708c;
    font-size: 12px;
}

#ai-record .ae-ai__idea-next {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    display: flex;
    align-items: center;
    min-height: 176px;
    margin: 12px 0 0;
    padding: 28px 32px;
    transform: none;
}

#ai-record .ae-ai__idea-next p {
    margin: 0;
    color: #143570;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;
}

#ai-record .ae-ai__idea-next strong {
    display: block;
    margin-bottom: 10px;
    color: #064bfa;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.5;
}

#ai-record .ae-ai__idea-next {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    display: flex;
    align-items: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 176px;
    margin: 12px 0 0;
    border: 1px solid #a9c8fa;
    border-left: 6px solid #064bfa;
    border-radius: 8px;
    padding: 28px 32px;
    background-color: #f3f8ff;
    background-image:
        linear-gradient(#064bfa09 1px, transparent 1px),
        linear-gradient(90deg, #064bfa09 1px, transparent 1px);
    background-size: 20px 20px;
    box-shadow: 5px 5px 0 #d5e8ff;
    transform: none;
}

/* 上端に添える半透明のテープ */
#ai-record .ae-ai__idea-next::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 24px;
    width: 76px;
    height: 20px;
    border: 1px solid #064bfa18;
    background: #9edcff99;
    transform: rotate(8deg);
    pointer-events: none;
}

/* 右下の丸で余白にアクセント */
#ai-record .ae-ai__idea-next::after {
    content: "";
    position: absolute;
    right: -32px;
    bottom: -48px;
    z-index: -1;
    width: 144px;
    height: 144px;
    border: 1px solid #064bfa18;
    border-radius: 50%;
    background: #b9e6ff80;
    box-shadow: 0 0 0 14px #b9e6ff30;
    pointer-events: none;
}

#ai-record .ae-ai__idea-next p {
    margin: 0;
    color: #143570;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;
}

#ai-record .ae-ai__idea-next strong {
    display: block;
    margin-bottom: 10px;
    color: #064bfa;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.5;
}

#ai-record .ae-ai__idea-next p > br {
    display: none;
}

/* メモに描いた後の青い状態 */
#ai-record .ae-ai__idea-next.is-active {
    border-color: #064bfa;
    background-color: #064bfa;
    background-image:
        linear-gradient(#ffffff16 1px, transparent 1px),
        linear-gradient(90deg, #ffffff16 1px, transparent 1px);
    box-shadow: 5px 5px 0 #9cc6ff;
}

#ai-record .ae-ai__idea-next.is-active p,
#ai-record .ae-ai__idea-next.is-active strong {
    color: #fff;
}

@media (max-width: 700px) {
    #ai-record .ae-ai__note--hero {
        padding: 20px 18px 18px 36px;
    }
    #ai-record .ae-ai__drawing-area {
        height: 180px;
    }

        #ai-record .ae-ai__day-group .ae-ai__switches {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #ai-record .ae-ai__record-note {
        margin: 0;
    }
    #ai-record > .ae-ai__section-heading {
    grid-template-columns: 1fr;
    padding-right: 0;
}

#ai-record .ae-ai__idea-next {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    margin: 0;
    padding: 20px 22px;
    transform: none;
}
}

#ai-project-detail .ae-ai__project-caption {
    margin: 16px 0 28px;
    border-left: 3px solid #a9c5fa;
    padding-left: 16px;
    color: #52647d;
    font-size: 14px;
    line-height: 1.8;
}

#ai-project-detail .ae-ai__project-caption p {
    margin: 0;
}

#ai-project-detail .ae-ai__project-caption strong {
    color: #143570;
}

#ai-project-detail .ae-ai__project-insight {
    border: 1px solid #bad0fa;
    border-top: 4px solid #064bfa;
    border-radius: 8px;
    padding: clamp(20px, 3vw, 32px);
    background-color: #103fae;
background-image: radial-gradient(
    circle, #ffffff20 2px, transparent 2.5px
);
background-size: 26px 26px;
box-shadow: 4px 4px 0 #c4dcff;
    position: relative;
    min-height: 330px;
    padding-right: 260px;
}

#ai-project-detail .ae-ai__project-person {
    position: absolute;
    right: 20px;
    bottom: 0;
    width: 220px;
    height: auto;
    pointer-events: auto;
    transition:
        transform 280ms ease,
        filter 280ms ease;
}

@media (hover: hover) and (pointer: fine)
    and (prefers-reduced-motion: no-preference) {
    #ai-project-detail .ae-ai__project-person:hover {
        transform: translateY(-8px) rotate(-1deg);
        filter: drop-shadow(0 10px 8px #001d6b30);
    }
}

@media (prefers-reduced-motion: reduce) {
    #ai-project-detail .ae-ai__project-person {
        transition: none;
    }
}

#ai-project-detail .ae-ai__project-message strong {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.5;
}

@media (max-width: 700px) {
    #ai-project-detail .ae-ai__project-insight {
        min-height: 0;
        padding-right: 20px;
        padding-bottom: 195px;
    }

    #ai-project-detail .ae-ai__project-person {
        right: 16px;
        width: 140px;
    }
}

#ai-project-detail .ae-ai__project-insight h3 {
    margin: 0 0 20px;
    color: #dceaff;
    font-size: clamp(20px, 2.2vw, 24px);
}

#ai-project-detail .ae-ai__project-message {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.7;
}

#ai-project-detail .ae-ai__project-insight > p:last-child {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: #e1ebff;
}

#ai-project-detail .ae-ai__project-source {
    margin: 16px 0 0;
    color: #687587;
    font-size: 12px;
    line-height: 1.7;
}

/* 詳細画面右上：資料と閉じる */
#ai-project-detail .ae-ai__project-tools {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

#ai-project-detail .ae-ai__project-tools form {
    display: flex;
    margin: 0;
}

#ai-project-detail .ae-ai__project-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    border: 1px solid #064bfa;
    border-radius: 6px;
    padding: 10px 14px;
    background: #fff;
    color: #064bfa;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

#ai-project-detail .ae-ai__project-download:hover {
    background: #e3edff;
}

#ai-project-detail .ae-ai__project-download:focus-visible {
    outline: 3px solid #143570;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    #ai-project-detail .ae-ai__report-toolbar {
        flex-wrap: wrap;
    }

    #ai-project-detail .ae-ai__report-toolbar > span {
        flex-basis: 100%;
    }

    #ai-project-detail .ae-ai__project-tools {
        width: 100%;
        gap: 8px;
    }

    #ai-project-detail .ae-ai__project-download {
        flex: 1;
        min-width: 0;
        padding: 10px;
        font-size: 12px;
    }
}

/* 読み終えた人への資料案内 */
#ai-project-detail .ae-ai__project-materials {
    margin-top: 28px;
    border: 1px solid #9dbbfa;
    border-top: 4px solid #064bfa;
    border-radius: 8px;
    padding: clamp(20px, 3vw, 32px);
    background-color: #eaf3ff;
background-image:
    linear-gradient(#87afff24 1px, transparent 1px),
    linear-gradient(90deg, #87afff24 1px, transparent 1px);
background-size: 24px 24px;
    box-shadow: 4px 4px 0 #e0ebff;
    display: flex;
flex-direction: column;
}

#ai-project-detail .ae-ai__project-materials h3 {
    margin: 0 0 12px;
    color: #143570;
    font-size: clamp(20px, 2.3vw, 26px);
    line-height: 1.5;
}

#ai-project-detail .ae-ai__project-materials > p:not(.ae-ai__eyebrow) {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.9;
}

#ai-project-detail .ae-ai__project-materials .ae-ai__project-download {
    background: #064bfa;
    color: #fff;
    align-self: flex-end;
order: 2;
flex: none;
max-width: 100%;
margin-top: 20px;
}

#ai-project-detail .ae-ai__project-materials .ae-ai__project-download:hover {
    background: #003bd0;
}

#ai-project-detail .ae-ai__project-materials small {
    display: block;
    margin-top: 14px;
    color: #687587;
    font-size: 12px;
    line-height: 1.8;
    order: 1;
}

/* 濃いカード上のラベル */
#ai-project-detail .ae-ai__project-insight > .ae-ai__eyebrow {
    color: #c2daff;
}

/* 資料カードの青いラベル */
#ai-project-detail .ae-ai__project-materials > .ae-ai__eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    border-radius: 4px;
    padding: 7px 12px;
    background: #064bfa;
    color: #fff;
}

/* 説明文の下は白くして読みやすく */
#ai-project-detail .ae-ai__project-materials > p:not(.ae-ai__eyebrow) {
    border: 1px solid #c5d9fa;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fff;
    color: #143570;
}

/* 詳細画面のボタン：浮く・押し込む */
#ai-project-detail :is(.ae-ai__project-download, .ae-ai__report-close) {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

#ai-project-detail .ae-ai__project-download > span {
    transition: transform 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
    #ai-project-detail :is(.ae-ai__project-download, .ae-ai__report-close):hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 12px #064bfa25;
    }

    #ai-project-detail .ae-ai__project-download:hover > span {
        transform: translateY(2px);
    }
}

#ai-project-detail :is(.ae-ai__project-download, .ae-ai__report-close):active {
    transform: translateY(1px);
    box-shadow: none;
}

/* 動きを抑える設定にも対応 */
@media (prefers-reduced-motion: reduce) {
    #ai-project-detail :is(.ae-ai__project-download, .ae-ai__report-close),
    #ai-project-detail .ae-ai__project-download > span {
        transition: none;
        transform: none;
    }
}

/* 工程・概要・紹介ボタンの控えめな動き */
@media (prefers-reduced-motion: no-preference) {
    #ai-project-detail :is(
        .ae-ai__checklist > li,
        .ae-ai__project-insight
    ),
    #ai-record :is(
        .ae-ai__checklist > li,
        .ae-ai__record-result,
        .ae-ai__record-note,
        .ae-ai__record-note > .ae-ai__button,
        .ae-ai__case-actions .ae-ai__button
    ) {
        transition:
            transform 200ms ease,
            box-shadow 200ms ease;
    }
}

@media (hover: hover) and (pointer: fine)
    and (prefers-reduced-motion: no-preference) {
    #ai-project-detail :is(
        .ae-ai__checklist > li,
        .ae-ai__project-insight
    ):hover,
    #ai-record :is(
        .ae-ai__checklist > li,
        .ae-ai__record-result,
        .ae-ai__record-note,
        .ae-ai__record-note > .ae-ai__button,
        .ae-ai__case-actions .ae-ai__button
    ):hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px #14357024;
    }
}

/* 詳細画面のシステム構成図 */
#ai-project-detail .ae-ai__project-architecture {
    margin: 20px 0;
    overflow-x: auto;
}

#ai-project-detail .ae-ai__project-architecture img {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
}

/* 実際に開発した診断テスト */
.ae-ai__case {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 32px;
    margin-bottom: 56px;
    border: 1px solid #b9cef3;
    border: 2px solid #064bfa;
    padding: 28px;
    background: #fff;
    box-shadow: 4px 4px 0 #8fcaff;
}

.ae-ai__case-bar {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: -28px -28px 0;
}

.ae-ai__case-bar + .ae-ai__case-copy {
    grid-column: 1 / -1;
}

.ae-ai__case-actions .ae-ai__button {
    border-radius: 0;
    box-shadow: 3px 3px 0 #8fcaff;
}

.ae-ai__case-preview {
    min-width: 0;
    margin: 0;
}

.ae-ai__case-preview img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #d2e2ff;
    border-radius: 8px;
}

.ae-ai__case-preview figcaption {
    margin-top: 8px;
    color: #56708c;
    font-size: 12px;
}

.ae-ai__case-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ae-ai__case-copy h3 {
    margin-bottom: 16px;
    color: #143570;
    font-size: clamp(24px, 2.5vw, 32px);
    line-height: 1.55;
    text-wrap: balance;
}

.ae-ai__case-copy h3 span {
    color: #064bfa;
}

.ae-ai__case-copy > .ae-ai__eyebrow {
    color: #56708c;
}

.ae-ai__case-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: auto;
    padding-top: 24px;
    justify-content: flex-end;
}

.ae-ai__case-status {
    margin-bottom: 0;
    border: 1px solid #d2e2ff;
    border-radius: 6px;
    padding: 12px 16px;
    background: #f3f8ff;
    color: #515c75;
    font-size: 14px;
}

#ai-development-log {
    scroll-margin-top: calc(var(--ai-nav-admin-offset) + 84px);
}

/* 画像と説明の列幅を明示する。画像がない場合は説明を全幅にする。 */
@media (min-width: 701px) {
    #ai-record .ae-ai__case {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    }

    .ae-ai__case-preview {
        grid-column: 1;
        grid-row: 2;
    }

    .ae-ai__case-preview + .ae-ai__case-copy {
        grid-column: 2;
        grid-row: 2;
    }

    .ae-ai__case-copy:only-child {
        grid-column: 1 / -1;
    }
}

.ae-ai__record-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.75fr);
    align-items: stretch;
    gap: 24px;
}

.ae-ai__record-note {
    background: linear-gradient(145deg, #ffffff, #f3f5fa);
    border-top: 5px solid #143570;
    box-shadow: 0 6px 18px #14357014;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.ae-ai__record-note h3 {
    margin: 12px 0 20px;
    color: #143570;
    font-size: 20px;
}

.ae-ai__record-note > p {
    margin-bottom: 0;
    font-size: 14px;
}

.ae-ai__record-note .ae-ai__record-caption {
    margin: 8px 0 24px;
    color: #064bfa;
    font-size: 16px;
    font-weight: 700;
}

/* 概要の見出しラベル */
.ae-ai__record-note > .ae-ai__note-label {
    align-self: flex-start;
    margin-bottom: 8px;
    border-radius: 4px;
    padding: 5px 9px;
    background: #143570;
    color: #fff;
}

/* 開発期間を実績として強調 */
.ae-ai__record-note .ae-ai__record-facts > div:last-child dd {
    color: #064bfa;
    font-size: 30px;
}

/* 詳細ボタンをカード下部に揃える */
.ae-ai__record-note > .ae-ai__button {
    width: 100%;
    margin-top: auto;
    text-align: center;
}

.ae-ai__record-note > .ae-ai__record-facts {
    margin-bottom: 24px;
}

.ae-ai__record-facts {
    display: grid;
    gap: 16px;
    margin: 0;
}

.ae-ai__record-facts > div {
    border-top: 1px solid #d2e2f5;
    padding-top: 12px;
}

.ae-ai__record-facts dt {
    margin-bottom: 4px;
    color: #56708c;
    font-size: 14px;
}

.ae-ai__record-facts dd {
    margin: 0;
    color: #080b20;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
}
.ae-ai__seven {
    display: block;
    margin-top: 20px;
    color: var(--ai-blue);
    font: 800 78px/1 Arial, sans-serif;
    letter-spacing: -0.07em;
}

.ae-ai__seven span {
    font-size: 32px;
    letter-spacing: -0.04em;
}

.ae-ai__switches {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.ae-ai__switches button {
    display: grid;
    align-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 88px;
    border: 1px solid #bad2ff;
    border-radius: 6px;
    padding: 12px 10px;
    background: #fff;
    color: var(--ai-ink);
    text-align: center;
    line-height: 1.5;
}

.ae-ai__switches button > span {
    font-size: 12px;
}

.ae-ai__switches button[aria-pressed="true"] {
    border-color: var(--ai-blue);
    background: var(--ai-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(6, 75, 250, 0.18);
}

.ae-ai__switches button:hover {
    border-color: var(--ai-blue);
}

/* 開発記録の日付：ノートの見出し */
.ae-ai__day-group .ae-ai__switches {
    gap: 8px;
    margin-bottom: 12px;
}

.ae-ai__day-group .ae-ai__switches button {
    position: relative;
    min-height: 112px;
    padding: 32px 10px 14px;
    background: linear-gradient(#dce9ff 22px, #fff 22px);
}

/* カレンダーの留め具 */
.ae-ai__day-group .ae-ai__switches button::before,
.ae-ai__day-group .ae-ai__switches button::after {
    content: "";
    position: absolute;
    top: -6px;
    width: 5px;
    height: 15px;
    border-radius: 3px;
    background: #8da6cd;
}

.ae-ai__day-group .ae-ai__switches button::before {
    left: 22%;
}

.ae-ai__day-group .ae-ai__switches button::after {
    right: 22%;
}

.ae-ai__day-group .ae-ai__switches button > strong {
    color: inherit;
    font: 700 18px/1.3 "Chakra Petch", Arial, sans-serif;
}

.ae-ai__day-group .ae-ai__switches button > span {
    font-size: 14px;
    line-height: 1.6;
}

.ae-ai__day-group .ae-ai__switches button[aria-pressed="true"] {
    border-color: #064bfa;
    background: linear-gradient(#064bfa 22px, #eaf1ff 22px);
    color: #064bfa;
    box-shadow: inset 0 -3px 0 #064bfa, 0 3px 10px #064bfa12;
}

@media (hover: hover) and (pointer: fine) {
    .ae-ai__day-group .ae-ai__switches button:hover {
        border-color: #064bfa;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ae-ai__day-group .ae-ai__switches button {
        transition: none;
    }
}

/* 開発記録：背景と作業項目を分ける */
#ai-record .ae-ai__day-panel .ae-ai__window-body {
    background: #f3f0fa;
}

#ai-record .ae-ai__day-panel .ae-ai__checklist li {
    border: 1px solid #ded8ee;
    background: #fff;
}

/* 開発事例の詳細：DAYごとの項目を区切る */
#ai-project-detail .ae-ai__checklist li {
    border: 1px solid #a9c8fa;
    background: #fff;
}

.ae-ai__day-panel + .ae-ai__day-panel {
    margin-top: 16px;
}

.ae-ai__checklist {
    display: grid;
    gap: 10px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.ae-ai__checklist li {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 5px;
    background: #f0f6ff;
}

.ae-ai__checklist li::before {
    content: "✓";
    color: var(--ai-blue);
    font-weight: 700;
}

.ae-ai__record-result {
    margin-bottom: 0;
    border: 1px solid #b7cffa;
    border-left: 4px solid #467cdb;
    border-radius: 6px;
    padding: 12px 16px;
    background: #eaf2ff;
    color: #143570;
    font-weight: 700;
}

