/* トップ、スケジュール、現行イベント・予約画面だけで読み込む。 */
:is(.home-page, .schedule-page, .legacy-reservation-event) {
    font-size: 1rem;
    line-height: 1.75;
}
#wrap.site-shell {
    --site-max: 1280px;
    --site-gutter: 32px;
    --reading-width: 800px;
    width: min(100%, calc(var(--site-max) + 2 * var(--site-gutter)));
    min-width: 0;
    margin-inline: auto;
    padding: 0 var(--site-gutter);
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
#wrap img { max-width: 100%; height: auto; }
#wrap.site-shell .site-main {
    display: flow-root;
    width: 100%;
    box-sizing: border-box;
    padding: .75rem 0 0;
}
#wrap.site-shell .site-footer {
    margin: 0;
    padding: 1.75rem 0;
    text-align: center;
    font-size: .875rem;
    line-height: 1.6;
    text-shadow: none;
}

/* 共通ヘッダー。ロゴ・メニュー・直下のコンテンツの左端を揃える。 */
#wrap .site-header {
    --menu-text: #242424;
    --menu-rule: #767676;
    --menu-hover: #f0f0f0;
    box-sizing: border-box;
    padding: 1rem 0 .875rem;
    font: 400 .9375rem/1.45 system-ui, "Yu Gothic", "Meiryo", sans-serif;
}
:is(.schedule-page, .legacy-reservation-event, .reservation-page:not(.reservation-complete)) #wrap .site-header {
    --menu-text: #f0f0f0;
    --menu-rule: #929292;
    --menu-hover: #282828;
}
#wrap .site-brand { display: block; width: fit-content; max-width: 100%; }
#wrap .site-brand img { display: block; }
#wrap .site-nav { margin: .65rem 0 0; border-bottom: 1px solid var(--menu-rule); }
#wrap .site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#wrap .site-nav li { margin: 0; padding: 0; }
#wrap .site-nav a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: .5em .6em;
    color: var(--menu-text);
    text-decoration: none;
}
#wrap .site-nav a:hover { background: var(--menu-hover); }
#wrap .site-nav a[aria-current] { text-decoration: underline; text-underline-offset: .3em; }
.schedule-page #wrap .schedule-ad { width: min(100%, 468px); margin-inline: auto; }
#wrap a:focus-visible, #reserve_form :is(input, select, textarea):focus-visible {
    outline: 2px solid #5696c6;
    outline-offset: 2px;
}
#wrap .site-brand { position: relative; }
#wrap .site-brand:focus-visible { outline: none; }
#wrap .site-brand:focus-visible::after {
    content: "";
    position: absolute;
    inset: auto 0 -5px;
    border-bottom: 2px solid #e04444;
}
#wrap #link-top {
    position: static;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-inline-start: .75em;
}
.home-page #wrap #footer { color: #555; }
.legacy-reservation-event #wrap #footer { color: #ccc; }

/* 写真はページ幅、長文とフォームは読みやすい行長にする。 */
.site-main .event-photo { display: block; width: 100%; height: auto; box-sizing: border-box; }
.site-main > p:not(:has(img, iframe)),
.content_wrap :is(.col_11, .col_6) p,
.site-main #reserve_form,
.site-main .reservation-error,
.site-main .completion-intro { max-width: var(--reading-width); }
.site-main #reserve_form table { width: 100%; }
/* トップの写真は元の解像度を上限とし、全スライドで表示領域を共有。 */
.home-hero {
    width: min(100%, var(--source-width));
    margin-inline: auto;
}
.hero-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    touch-action: pan-y pinch-zoom;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--fade-time) ease-in-out;
}
.hero-slide.is-current { opacity: 1; }
#wrap .hero-slide img { display: block; width: 100%; height: 100%; object-fit: scale-down; }
.hero-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: .35rem;
}
.hero-controls[hidden] { display: none; }
.home-hero .hero-controls button {
    display: grid;
    place-items: center;
    width: clamp(18px, 6vw, 24px);
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}
.hero-controls button::before {
    content: "";
    width: 8px;
    height: 8px;
    border: 1px solid #777;
    border-radius: 50%;
}
.hero-controls button:hover::before { border-color: #252525; }
.hero-controls button[aria-current]::before { background: #252525; border-color: #252525; }
.hero-controls button:focus-visible { outline: 2px solid #436f93; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}

/* 写真は誌面幅で、見出しと本文は読みやすい行長で表示。 */
.home-content { color: #202020; }
.home-content :is(.home-lead, .home-section) {
    margin: clamp(2.75rem, 6vw, 5.5rem) 0;
}
.home-content :is(h1, h2) {
    margin: 0 0 .7em;
    font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
    font-weight: 600;
    letter-spacing: .025em;
    line-height: 1.5;
    text-wrap: balance;
}
.home-content h1 { font-size: clamp(1.6rem, 3.4vw, 2.8rem); }
.home-lead h1 span { display: inline-block; }
.home-content h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }
.home-content :is(.home-section, .home-lead) > p {
    max-width: var(--reading-width);
    margin: 0 0 .7em;
    font-size: 1rem;
    line-height: 1.8;
}
.home-content .home-section > .section-label {
    margin-bottom: .85rem;
    font: 600 .8125rem/1.5 system-ui, sans-serif;
    letter-spacing: .15em;
    color: #626262;
}
.home-content .home-section > .event-photo { margin: 1.5rem 0; }
.home-content .schedule-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: .4rem;
    color: #242424;
    text-underline-offset: .28em;
}
.public-session { margin: 1.5rem 0; }
.public-session a { display: block; color: inherit; text-decoration: none; }
.public-session time { display: block; font: 500 .92rem/1.6 system-ui, sans-serif; }
.public-session .session-name {
    display: block;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .22em;
}
.public-session .event-photo { margin-top: .8rem; }
@media (min-width: 900px) {
    .home-content .home-section {
        display: grid;
        grid-template-columns: clamp(10rem, 20%, 16rem) minmax(0, 1fr);
        align-items: start;
    }
    .home-section > * { grid-column: 2; }
    .home-section > .section-label { grid-column: 1; grid-row: 1; padding-top: .65rem; }
    .home-section > h2 { grid-row: 1; }
    .home-section > .event-photo { grid-column: 1 / -1; }
    .home-section > .schedule-link { justify-self: start; }
}

/* 撮影会の写真と概要。プロフィールだけ表示幅に上限を設ける。 */
.legacy-reservation-event .content_wrap { line-height: 1.75; }
.legacy-reservation-event .content_wrap p { line-height: 1.75; }
.legacy-reservation-event .event-heading { margin-top: 0; }
.legacy-reservation-event .okuru_profile img { max-width: min(100%, 360px); }
.legacy-reservation-event .content_wrap a { color: #b9ddff; }
.legacy-reservation-event .content_wrap .ps_theme { color: #b9cfed; border-color: #617797; }
.legacy-reservation-event .content_wrap .title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    line-height: 1.55;
    color: #ff7676;
}
.legacy-reservation-event .content_wrap .event-reserve-link {
    display: inline-flex;
    align-items: center;
    gap: .85em;
    box-sizing: border-box;
    min-height: 48px;
    padding: .65em 1.15em;
    border-radius: 3px;
    background: #ff7676;
    color: #171111;
    font: 600 .9375rem/1.45 system-ui, "Yu Gothic", Meiryo, sans-serif;
    text-decoration: none;
}
.event-reserve-link::after {
    content: "";
    width: .45em;
    height: .45em;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateY(-.12em) rotate(45deg);
}
.legacy-reservation-event .content_wrap .event-reserve-link:hover { background: #ff9999; }
#wrap .event-reserve-link:focus-visible { outline-color: #fff; outline-offset: 4px; }
#reservation-section { scroll-margin-top: 1rem; }

/* イベント内と再入力画面で同じフォーム部品を使う。 */
#reserve_form :is(th, td, label, p) { font-size: 1rem; line-height: 1.7; }
#reserve_form :is(th, td) { white-space: normal; word-break: normal; }
#reserve_form th { font-weight: 600; }
#reserve_form .field-status { color: #ffb0b0; font-size: .875rem; }
#reserve_form .field-status.optional { color: #ccc; font-weight: normal; }
#reserve_form :is(input[type=text], input[type=email], select, textarea) {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.5;
    background: #fff;
    color: #222;
}
#reserve_form textarea { min-height: 110px; resize: vertical; }
#reserve_form label.reservation-choice {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .65em;
    min-height: 44px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 4px;
    box-sizing: border-box;
    cursor: pointer;
}
#reserve_form .reservation-choice span { font-size: inherit; color: inherit; }
#reserve_form .reservation-choice input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
}
#reserve_form input[type=submit] {
    max-width: 100%;
    min-height: 44px;
    padding: .65em 1em;
    font-size: 1rem;
    line-height: 1.5;
    white-space: normal;
    text-align: center;
    cursor: pointer;
}
.reservation-page .reservation-error ul { padding-inline-start: 1.25em; }
.reservation-page.reservation-complete section {
    max-width: var(--reading-width);
    overflow-wrap: anywhere;
}
.reservation-complete main a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 1024px) {
    #wrap.site-shell { --site-gutter: 24px; }
}

@media (max-width: 800px) {
    .legacy-reservation-event #wrap :is(.col_1, .col_5, .col_6, .col_11, .col_12) {
        width: 100%;
        float: none;
        margin: 0 !important;
        box-sizing: border-box;
    }
    .legacy-reservation-event #wrap .content_wrap .ps_theme { margin-right: 0 !important; }
    .legacy-reservation-event .content_wrap .title { margin-block: 1.15em; }
    .legacy-reservation-event .okuru_profile img { max-width: min(100%, 260px); }
}

@media (max-width: 700px) {
    #wrap.site-shell { --site-gutter: 16px; }
    #reserve_form :is(table, tbody, tr, th, td) {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    #reserve_form tr { padding: .6rem .75rem; }
    #reserve_form :is(th, td) { padding: 0; }
    #reserve_form :is(th, td) p { margin: .35em 0; }
    #reserve_form th:empty { display: none; }
    #reserve_form input[type=submit] { width: 100%; }
}
