.aeh-app{
    --aeh-bg: #fbf7ec;
    --aeh-paper: #fffdf8;
    --aeh-white: #fff;
    --aeh-ink: #21333e;
    --aeh-blue: #154f78;
    --aeh-blue-dark: #0e3b5c;
    --aeh-blue-soft: #e3f0f5;
    --aeh-red: #c9473e;
    --aeh-red-soft: #fff0ed;
    --aeh-line: #c9d7da;
    --aeh-muted: #677780;
    background: var(--aeh-bg);
    color: var(--aeh-ink);
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.75;
    margin: 0;
    min-width: 0;
}
.aeh-app *,.aeh-app *::before,.aeh-app *::after{ box-sizing: border-box; }
.aeh-app button,.aeh-app input,.aeh-app select,.aeh-app textarea{ font: inherit; }
.aeh-app [hidden]{ display: none !important; }
.aeh-app button{ touch-action: manipulation; }
.aeh-hero{
    align-items: center;
    display: grid;
    gap: 62px;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    margin: 0 auto;
    max-width: 1180px;
    min-height: 610px;
    padding: 82px 28px 94px;
}
.aeh-eyebrow{ color: var(--aeh-red); font-size: 11px; font-weight: 900; letter-spacing: .18em; margin: 0 0 10px; }
.aeh-hero h1,.aeh-tool-heading h2,.aeh-section-intro h2{
    color: var(--aeh-blue);
    font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-weight: 800;
    letter-spacing: .02em;
}
.aeh-hero h1{ font-size: clamp(38px, 4vw, 48px); line-height: 1.32; margin: 0 0 22px; }
.aeh-hero h1 span{ white-space: nowrap; }
.aeh-lead{ font-size: 17px; margin: 0; max-width: 760px; }
.aeh-points{ display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.aeh-points span{ background: var(--aeh-blue-soft); border-radius: 999px; color: var(--aeh-blue); font-size: 12px; font-weight: 900; padding: 7px 12px; }
.aeh-hero-cta{ background: var(--aeh-blue); border-radius: 10px; color: #fff; display: inline-block; font-size: 14px; font-weight: 900; margin-top: 25px; padding: 13px 22px; text-decoration: none; }
.aeh-hero-cta:hover{ background: var(--aeh-blue-dark); color: #fff; transform: translateY(-1px); }
.aeh-hero-card{
    background: var(--aeh-paper);
    border: 1px solid var(--aeh-line);
    border-radius: 10px;
    box-shadow: 18px 18px 0 var(--aeh-blue-soft);
    display: grid;
    gap: 0;
    padding: 30px;
    transform: rotate(1.5deg);
}
.aeh-hero-card > p{ color: var(--aeh-muted); font-size: 12px; font-weight: 800; margin: 0 0 12px; }
.aeh-hero-card > div{ border-top: 1px dashed var(--aeh-line); display: grid; gap: 2px; padding: 13px 0; }
.aeh-hero-card span{ color: var(--aeh-red); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.aeh-hero-card b{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 17px; }
.aeh-tool{ background: var(--aeh-paper); border-bottom: 1px solid var(--aeh-line); border-top: 1px solid var(--aeh-line); padding: 78px max(28px, calc((100vw - 1180px) / 2)); scroll-margin-top: 12px; }
.aeh-tool-heading{ margin: 0 auto 28px; max-width: 1180px; }
.aeh-tool-heading h2{ font-size: clamp(29px, 4vw, 44px); line-height: 1.42; margin: 0 0 10px; }
.aeh-tool-heading > p:last-child,.aeh-help{ color: var(--aeh-muted); margin: 0; }
.aeh-view-switch{ background: var(--aeh-blue-soft); border-radius: 14px; display: inline-grid; gap: 5px; grid-template-columns: 1fr 1fr; margin: 0 0 24px; padding: 5px; }
.aeh-view-switch button{ background: transparent; border: 0; border-radius: 10px; color: var(--aeh-blue); cursor: pointer; display: grid; font-size: 14px; font-weight: 900; line-height: 1.35; min-height: 54px; padding: 8px 22px; text-align: left; }
.aeh-view-switch button small{ font-size: 8px; letter-spacing: .14em; }
.aeh-view-switch button.is-active{ background: #fff; box-shadow: 0 3px 10px rgba(21, 79, 120, .13); }
.aeh-quick-grid{ align-items: stretch; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 320px; margin: 0 auto; max-width: 1180px; }
.aeh-panel,.aeh-quick-note,.aeh-template-bar,.aeh-school-card,.aeh-event-row,.aeh-preview{ background: #fff; border: 1px solid var(--aeh-line); border-radius: 15px; }
.aeh-panel{ box-shadow: 0 12px 28px rgba(32, 49, 61, .06); padding: 27px; }
.aeh-quick-note{ background: #f1f7f9; padding: 26px; }
.aeh-quick-note > b{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 21px; }
.aeh-quick-note p{ color: var(--aeh-muted); font-size: 13px; margin: 8px 0 12px; }
.aeh-quick-note ul{ margin: 0; padding-left: 1.2em; }
.aeh-quick-note li{ font-size: 12px; padding: 2px 0; }
.aeh-inline-fields{ display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-bottom: 15px; }
.aeh-inline-fields-3{ grid-template-columns: 1.15fr .85fr; }
.aeh-field{ display: grid; gap: 6px; min-width: 0; }
.aeh-field > span,.aeh-output-controls label > span{ color: var(--aeh-ink); font-size: 12px; font-weight: 900; }
.aeh-field em{ color: var(--aeh-red); font-size: 9px; font-style: normal; margin-left: 4px; }
.aeh-field small{ color: var(--aeh-muted); font-size: 10px; line-height: 1.5; }
.aeh-field input,.aeh-field select,.aeh-field textarea,.aeh-output-controls select,.aeh-template-bar select{
    background: #fff;
    border: 1px solid #adbec4;
    border-radius: 8px;
    color: var(--aeh-ink);
    min-height: 45px;
    padding: 8px 10px;
    width: 100%;
}
.aeh-field input:focus,.aeh-field select:focus,.aeh-field textarea:focus,.aeh-output-controls select:focus,.aeh-template-bar select:focus{ border-color: var(--aeh-blue); box-shadow: 0 0 0 3px rgba(21, 79, 120, .13); outline: none; }
.aeh-primary-button,.aeh-copy-button{ background: var(--aeh-blue); border: 0; border-radius: 9px; color: #fff; cursor: pointer; font-weight: 900; min-height: 50px; padding: 11px 18px; }
.aeh-primary-button{ margin-top: 7px; width: 100%; }
.aeh-primary-button:hover,.aeh-copy-button:hover{ background: var(--aeh-blue-dark); transform: translateY(-1px); }
.aeh-error,.aeh-warning{ background: var(--aeh-red-soft); border: 1px solid #e8afa9; border-radius: 8px; color: #8d302a; font-size: 12px; margin: 12px 0 0; padding: 10px 12px; }
.aeh-age-fallback{ border-bottom: 1px dashed var(--aeh-line); border-top: 1px dashed var(--aeh-line); margin: 4px 0 16px; padding: 11px 0; }
.aeh-age-fallback summary{ color: var(--aeh-blue); cursor: pointer; font-size: 12px; font-weight: 900; }
.aeh-age-fallback[open] summary{ margin-bottom: 11px; }
.aeh-age-fallback > small{ color: var(--aeh-muted); display: block; font-size: 10px; margin-top: -5px; }
.aeh-template-bar{ align-items: end; display: flex; gap: 12px; justify-content: space-between; margin: 0 auto 18px; max-width: 1180px; padding: 15px; }
.aeh-template-bar > div{ display: grid; flex: 1; gap: 4px; max-width: 560px; }
.aeh-template-bar span{ color: var(--aeh-muted); font-size: 10px; font-weight: 900; }
.aeh-template-bar button,.aeh-sub-button,.aeh-preview-actions button{
    background: #fff;
    border: 1px solid var(--aeh-blue);
    border-radius: 8px;
    color: var(--aeh-blue);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    min-height: 44px;
    padding: 8px 13px;
}
.aeh-template-bar button:hover,.aeh-sub-button:hover,.aeh-preview-actions button:hover{ background: var(--aeh-blue-soft); }
.aeh-builder-grid{ align-items: start; display: grid; gap: 22px; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); margin: 0 auto; max-width: 1180px; }
.aeh-editor-heading{ align-items: center; display: flex; gap: 15px; justify-content: space-between; }
.aeh-editor-heading h3{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 24px; line-height: 1.4; margin: 0; }
.aeh-help{ font-size: 12px; margin: 6px 0 15px; }
.aeh-timeline-editor{ display: grid; gap: 13px; }
.aeh-school-card{ overflow: hidden; position: relative; }
.aeh-school-card::before{ background: var(--aeh-blue); content: ""; height: 100%; left: 0; position: absolute; top: 0; width: 4px; }
.aeh-school-card.is-overseas::before{ background: #247a69; }
.aeh-school-card.is-historical::before{ background: #8d6f3d; }
.aeh-school-summary{ align-items: center; background: #f8fbfc; border: 0; cursor: pointer; display: flex; gap: 12px; justify-content: space-between; padding: 14px 16px 14px 18px; width: 100%; }
.aeh-school-summary > span:first-child{ display: grid; text-align: left; }
.aeh-school-summary b{ color: var(--aeh-blue); font-size: 14px; }
.aeh-school-summary small{ color: var(--aeh-muted); font-size: 10px; }
.aeh-school-summary i{ color: var(--aeh-blue); font-style: normal; transition: transform .2s; }
.aeh-school-card.is-open .aeh-school-summary i{ transform: rotate(180deg); }
.aeh-school-body{ border-top: 1px solid var(--aeh-line); display: none; padding: 16px 16px 17px 18px; }
.aeh-school-card.is-open .aeh-school-body{ display: block; }
.aeh-card-grid{ display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aeh-card-grid .aeh-span-2{ grid-column: span 2; }
.aeh-date-grid{ background: #f6f9fa; border-radius: 9px; display: grid; gap: 10px; grid-column: span 2; grid-template-columns: repeat(3, 1fr); margin-top: 2px; padding: 12px; }
.aeh-date-pair{ display: grid; gap: 5px; grid-template-columns: 1.35fr .65fr; }
.aeh-card-actions{ align-items: center; border-top: 1px dashed var(--aeh-line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; padding-top: 12px; }
.aeh-card-actions button{ background: #fff; border: 1px solid var(--aeh-line); border-radius: 7px; color: var(--aeh-blue); cursor: pointer; font-size: 11px; font-weight: 800; min-height: 38px; padding: 6px 10px; }
.aeh-card-actions button[data-action="remove"]{ border-color: #e4b8b4; color: #a13a33; }
.aeh-card-include,.aeh-event-include{ align-items: center; color: var(--aeh-muted); display: inline-flex; font-size: 10px; font-weight: 800; gap: 5px; margin-right: auto; }
.aeh-card-include input,.aeh-event-include input{ accent-color: var(--aeh-blue); height: 17px; width: 17px; }
.aeh-event-section{ border-top: 2px solid var(--aeh-blue-soft); margin-top: 34px; padding-top: 27px; }
.aeh-event-chips{ display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.aeh-event-chips button{ background: var(--aeh-red-soft); border: 1px solid #edc0bc; border-radius: 999px; color: #8e312b; cursor: pointer; font-size: 11px; font-weight: 900; min-height: 38px; padding: 6px 11px; }
.aeh-event-chips button:hover{ background: #ffe1dd; }
.aeh-event-list{ display: grid; gap: 9px; }
.aeh-event-row{ align-items: end; display: grid; gap: 9px; grid-template-columns: 100px 76px minmax(130px, 1fr) auto auto; padding: 11px; }
.aeh-event-row button{ background: #fff; border: 1px solid #e4b8b4; border-radius: 7px; color: #a13a33; cursor: pointer; font-size: 11px; min-height: 42px; padding: 6px 9px; }
.aeh-preview{ max-height: calc(100vh - 30px); overflow: auto; padding: 20px; position: sticky; top: 15px; }
.aeh-preview-head{ align-items: start; display: flex; gap: 12px; justify-content: space-between; }
.aeh-preview-head h3{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 23px; margin: 0; }
.aeh-preview-head > span{ background: var(--aeh-blue-soft); border-radius: 999px; color: var(--aeh-blue); font-size: 10px; font-weight: 900; padding: 5px 9px; }
.aeh-output-controls{ display: grid; gap: 9px; grid-template-columns: 1fr 1fr; margin: 16px 0; }
.aeh-output-controls label{ display: grid; gap: 4px; }
.aeh-output-controls select{ font-size: 11px; min-height: 40px; padding: 6px 7px; }
.aeh-output{ border-bottom: 1px solid var(--aeh-line); border-top: 1px solid var(--aeh-line); min-height: 190px; padding: 8px 0; }
.aeh-output > p{ color: var(--aeh-muted); font-size: 12px; }
.aeh-output-row{ border-bottom: 1px dashed #dbe3e5; display: grid; gap: 7px; grid-template-columns: 94px 1fr; padding: 10px 3px; }
.aeh-output-row:last-child{ border-bottom: 0; }
.aeh-output-row time{ color: var(--aeh-red); font-size: 10px; font-weight: 900; white-space: nowrap; }
.aeh-output-row span{ font-size: 12px; font-weight: 700; }
.aeh-output-row.is-event span{ font-weight: 900; }
.aeh-preview-actions{ display: grid; gap: 9px; grid-template-columns: 1.5fr .5fr; margin-top: 15px; }
.aeh-preview-actions .aeh-copy-button{ color: #fff; }
.aeh-copy-status{ color: var(--aeh-blue); font-size: 11px; font-weight: 800; margin: 7px 0 0; min-height: 18px; }
.aeh-privacy-note{ color: var(--aeh-muted); font-size: 11px; margin: 18px auto 0; max-width: 1180px; text-align: center; }
.aeh-cases{ margin: 0 auto; max-width: 1180px; padding: 92px 28px 104px; }
.aeh-section-intro{ max-width: 820px; }
.aeh-section-intro h2{ font-size: clamp(31px, 4vw, 48px); line-height: 1.4; margin: 0 0 13px; }
.aeh-section-intro > p:last-child{ margin: 0; }
.aeh-case-grid{ display: grid; gap: 15px; grid-template-columns: repeat(3, 1fr); margin: 38px 0 74px; }
.aeh-case-grid article{ background: var(--aeh-paper); border: 1px solid var(--aeh-line); border-radius: 12px; padding: 22px; }
.aeh-case-grid b{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 18px; }
.aeh-case-grid p{ color: var(--aeh-muted); font-size: 12px; margin: 7px 0 0; }
.aeh-prose{ margin: 0 auto; max-width: 850px; }
.aeh-prose > h2{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 27px; line-height: 1.5; margin: 46px 0 10px; }
.aeh-prose > p{ margin: 0; }
.aeh-notice{ background: #edf5f8; border: 1px solid #b9d0da; border-radius: 12px; margin: 50px 0; padding: 23px; }
.aeh-notice h2{ color: var(--aeh-blue); font-size: 20px; margin: 0 0 6px; }
.aeh-notice p{ margin: 0; }
.aeh-faq{ scroll-margin-top: 16px; }
.aeh-faq > h2{ color: var(--aeh-blue); font-family: "Yu Mincho", serif; font-size: 31px; margin: 0 0 20px; }
.aeh-faq details{ border-bottom: 1px solid var(--aeh-line); padding: 15px 3px; }
.aeh-faq summary{ color: var(--aeh-blue); cursor: pointer; font-weight: 900; }
.aeh-faq details p{ color: var(--aeh-muted); margin: 9px 0 0; }
.aeh-mobile-dock{ display: none; }
@media (max-width: 1100px){.aeh-hero{ gap: 40px; grid-template-columns: 1fr; min-height: auto; }
.aeh-hero-card{ margin: 0 14px; max-width: 620px; }
.aeh-quick-grid{ grid-template-columns: 1fr; }
.aeh-quick-note{ display: grid; grid-template-columns: 1fr 1fr; }
.aeh-quick-note > b,.aeh-quick-note > p{ grid-column: span 2; }
.aeh-builder-grid{ grid-template-columns: 1fr; }
.aeh-preview{ max-height: none; position: static; }
.aeh-case-grid{ grid-template-columns: repeat(2, 1fr); }}
@media (max-width: 720px){.aeh-hero{ padding: 54px 19px 70px; }
.aeh-hero h1{ font-size: 37px; }
.aeh-hero h1 span{ white-space: normal; }
.aeh-lead{ font-size: 15px; }
.aeh-hero-card{ margin: 0 7px; padding: 23px; }
.aeh-tool{ padding: 58px 18px 90px; }
.aeh-tool-heading h2{ font-size: 31px; }
.aeh-view-switch{ display: grid; width: 100%; }
.aeh-view-switch button{ padding-inline: 12px; }
.aeh-inline-fields,.aeh-inline-fields-3{ grid-template-columns: 1fr; }
.aeh-panel{ padding: 20px 16px; }
.aeh-quick-note{ display: block; }
.aeh-template-bar{ align-items: stretch; display: grid; }
.aeh-template-bar > div{ max-width: none; }
.aeh-editor-heading{ align-items: flex-start; display: grid; }
.aeh-sub-button{ width: 100%; }
.aeh-card-grid{ grid-template-columns: 1fr; }
.aeh-card-grid .aeh-span-2,.aeh-date-grid{ grid-column: auto; }
.aeh-date-grid{ grid-template-columns: 1fr; }
.aeh-event-row{ grid-template-columns: 1fr 80px; }
.aeh-event-row .aeh-event-text{ grid-column: span 2; }
.aeh-event-row button{ grid-column: auto; }
.aeh-output-controls{ grid-template-columns: 1fr; }
.aeh-case-grid{ grid-template-columns: 1fr; }
.aeh-cases{ padding: 72px 19px 100px; }
.aeh-mobile-dock:not([hidden]){
        background: rgba(255,255,255,.96);
        border-top: 1px solid var(--aeh-line);
        bottom: 0;
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr auto;
        left: 0;
        padding: 9px 12px max(9px, env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 30;
    }
.aeh-mobile-dock button{ background: var(--aeh-blue); border: 0; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 900; min-height: 44px; padding: 8px 13px; }
.aeh-mobile-dock button:last-child{ background: #fff; border: 1px solid var(--aeh-blue); color: var(--aeh-blue); }}
@media (max-width: 420px){.aeh-hero h1{ font-size: 33px; }
.aeh-view-switch button{ font-size: 12px; }
.aeh-event-chips button{ flex: 1 1 auto; }
.aeh-preview{ padding: 17px 14px; }
.aeh-output-row{ grid-template-columns: 83px 1fr; }}