/* WordPress content integration. */

.fgj-editor-content .entry-content,
.fgj-comments,
.comment-respond {
  width: min(860px, 100%);
  margin-inline: auto;
}

.fgj-editor-content .entry-content > * + * { margin-top: 1.4em; }
.fgj-editor-content .entry-content h2 { margin-top: 2.2em; font-size: clamp(28px, 4vw, 54px); }
.fgj-editor-content .entry-content h3 { margin-top: 2em; font-size: clamp(22px, 3vw, 34px); }
.fgj-editor-content .entry-content p,
.detail-body p { line-height: 2; }
.fgj-empty { padding: 40px 0; color: var(--muted); }
.navigation.pagination { margin-top: 72px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nav-links .page-numbers { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); }
.nav-links .current { color: #fff; background: #111; border-color: #111; }
.archive-tools a.is-active { color: #111; border-bottom-color: #111; }
.detail-body ul:not(.detail-data), .detail-body ol { padding-left: 1.4em; line-height: 2; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }


/* Keep plugin-native event and booking output within the approved layout. */
.fgj-events-content { min-width: 0; }
.fgj-events-content .em { --font-family: var(--sans); --default-border: var(--line); font-family: var(--sans); }
.fgj-events-content img { max-width: 100%; height: auto; }
.fgj-events-content input, .fgj-events-content select, .fgj-events-content textarea { max-width: 100%; font: inherit; }
.fgj-events-content .em-booking-form { max-width: 100%; }
.fgj-events-content .entry-content > p { line-height: 1.9; }
.fgj-event-detail .detail-body { min-width: 0; overflow-wrap: anywhere; }
.fgj-event-detail .em { max-width: 100%; }
.event-list > .fgj-empty { padding: 40px var(--pad); }
@media(max-width: 820px) {
 .fgj-events-content { padding-inline: 24px; }
 .fgj-event-detail .fgj-events-content { padding-inline: 0; }
 .fgj-events-content table { display: block; overflow-x: auto; max-width: 100%; }
 /* FullCalendar uses nested tables for aligned weekday/date/event columns. */
 .fgj-events-content .fc table { display: table; width: 100%; table-layout: fixed; overflow: visible; }
 .fgj-events-content .fc-scroller { height: auto !important; overflow: visible !important; }
}

/* Keep the approved single-line label inside narrow phone screens. */
@media(max-width: 360px) {
 .experiences__intro > p { font-size: clamp(20px, 6.6vw, 24px); }
}

/* Desktop sidebar: retain full navigation on short screens. */
@media (min-width: 861px) {
 .side { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; padding-top: 24px; padding-bottom: 20px; }
 .side > * { flex-shrink: 0; }
 .side__logo { height: 96px; margin-bottom: 24px; }
 .side__logo img { width: 100%; height: 96px; object-fit: contain; object-position: center; }
 .side__bottom { margin-top: 24px; }
 .side__cta--line { width: 100%; flex-wrap: nowrap; line-height: 1; }
 body.admin-bar .side { top: 32px; }
}
@media (min-width: 861px) and (max-height: 760px) {
 .side { padding-top: 18px; padding-bottom: 16px; }
 .side__logo { height: 80px; margin-bottom: 18px; }
 .side__logo img { height: 80px; }
 .side__nav a { height: 40px; }
 .side__bottom { margin-top: 16px; }
}

a[name="em-event-booking-form"] { display: block; }

/* Editorial headings must leave room for the story, even with long titles. */
.single-post .detail-hero { padding-top: clamp(80px, 8vw, 120px); padding-bottom: clamp(42px, 5vw, 68px); }
.single-post .detail-hero h1 { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.5; text-wrap: pretty; word-break: normal; word-break: auto-phrase; overflow-wrap: anywhere; }
.single-post .detail-hero__meta { flex-wrap: wrap; row-gap: 8px; margin-bottom: 26px; }
.page-company .page-hero__lead { max-width: 720px; text-wrap: pretty; word-break: normal; word-break: auto-phrase; }
.fgj-events-index .page-hero__image { object-position: center top; }
:is(#em-event-booking-form, a[name="em-event-booking-form"]) { scroll-margin-top: 24px; }
body.admin-bar :is(#em-event-booking-form, a[name="em-event-booking-form"]) { scroll-margin-top: 56px; }
@media (max-width: 860px) {
 .fgj-events-index .page-hero__image { top: 72px; height: calc(100% - 72px); }
 .single-post .detail-hero { padding: 112px 22px 42px; }
 .single-post .detail-hero h1 { font-size: clamp(27px, 7.2vw, 32px); line-height: 1.55; }
 :is(#em-event-booking-form, a[name="em-event-booking-form"]) { scroll-margin-top: 96px; }
 body.admin-bar :is(#em-event-booking-form, a[name="em-event-booking-form"]) { scroll-margin-top: 142px; }
}

/* Quiet editorial hierarchy; retain the original aspect ratio of every image. */
:is(.single-post, .single-event) .detail-hero {
 padding-top: 68px; padding-bottom: 32px;
}
:is(.single-post, .single-event) .detail-hero h1 {
 max-width: 780px; font-size: 32px; line-height: 1.65; letter-spacing: .015em;
 text-wrap: pretty; word-break: normal; word-break: auto-phrase;
}
:is(.single-post, .single-event) .detail-hero__meta { margin-bottom: 20px; flex-wrap: wrap; gap: 8px 16px; }
:is(.single-post, .single-event) .detail-visual {
 height: auto; display: flex; justify-content: center; align-items: center;
 padding-block: 12px 36px; background: var(--paper); overflow: visible;
}
:is(.single-post, .single-event) .detail-visual img {
 width: auto; height: auto; max-width: 100%; max-height: 560px; object-fit: contain;
}
:is(.single-post, .single-event) .detail-layout {
 grid-template-columns: 108px minmax(0, 720px); gap: 40px;
 justify-content: center; padding-top: 48px; padding-bottom: 80px;
}
:is(.single-post, .single-event) .detail-body { width: 100%; min-width: 0; max-width: 720px; }
.detail-body h2 { font-size: 25px; line-height: 1.7; margin-top: 52px; }
.detail-share .back-link { margin-top: 0; min-height: 44px; display: inline-flex; align-items: center; line-height: 1.8; }
.detail-share div { flex-wrap: wrap; gap: 4px 16px; }
.detail-share div a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }

/* Index photographs and posters are framed, never enlarged into a crop. */
:is(.blog, .category, .single-post) .archive-card figure { aspect-ratio: 4 / 3; background: #eae5dc; }
:is(.blog, .category, .single-post) .archive-card img { width: 100%; height: 100%; object-fit: contain; }
:is(.blog, .category, .single-post) .archive-card:hover img { transform: none; filter: none; }
:is(.blog, .category, .single-post) .archive-card figure::after { display: none; }
:is(.blog, .category, .single-post) .archive-card :is(h2,h3) { font-size: 22px; line-height: 1.7; letter-spacing: .01em; text-wrap: pretty; }
:is(.blog, .category) .archive-card--wide { grid-template-columns: 1fr 1.1fr; gap: 36px; }
:is(.blog, .category) .archive-card > div > p:not(.archive-card__meta) { margin-top: 16px; color: #625d55; font-size: 14px; line-height: 1.9; }
:is(.blog, .category, .fgj-events-index) .page-hero { min-height: 0; height: 380px; }
:is(.blog, .category, .fgj-events-index) .page-hero h1 { font-size: 38px; }
:is(.blog, .category) .page-hero__image { object-position: center top; }

/* Style the existing Events Manager list; preserve its links/actions/pagination. */
.fgj-events-index .em.em-events-list .em-item {
 display: grid; grid-template-columns: minmax(180px, .72fr) minmax(0, 1.28fr);
 gap: 32px; align-items: start; padding: 32px 0; margin: 0;
 border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent;
}
.fgj-events-index .em.em-events-list .em-item-image {
 display: flex !important; width: 100%; height: auto; aspect-ratio: 4 / 3;
 align-items: center; justify-content: center; background: #eae5dc; overflow: hidden;
}
.fgj-events-index .em.em-events-list .em-item-image img {
 display: block; width: 100%; height: 100%; object-fit: contain; max-height: 300px;
}
.fgj-events-index .em.em-events-list .em-item-info { min-width: 0; width: auto; padding: 0 !important; border: 0 !important; }
.fgj-events-index .em.em-events-list .em-item-title { margin: 0 0 14px !important; font-size: 22px !important; line-height: 1.7 !important; font-weight: 500 !important; }
.fgj-events-index .em.em-events-list .em-item-title a { color: var(--ink) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; text-decoration: none !important; }
.fgj-events-index .em.em-events-list .em-item-title,
.fgj-events-index .em.em-events-list .em-item-title a { word-break: normal !important; word-break: auto-phrase !important; overflow-wrap: normal !important; line-break: strict; }
.fgj-events-index .em.em-events-list .em-item-meta { font-size: 13px !important; line-height: 1.9 !important; }
.fgj-events-index .em.em-events-list .em-item-desc { margin-block: 14px; font-size: 13px; line-height: 1.9; }
.fgj-events-index .em.em-events-list .em-item-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; }
.fgj-events-index #main .em.em-events-list .em-item-actions a {
 display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
 padding: 5px 0 !important; border: 0 !important; border-bottom: 1px solid var(--ink) !important; border-radius: 0 !important;
 background: transparent !important; color: var(--ink) !important; box-shadow: none !important; font: inherit; font-size: 13px !important;
}

/* Keep AddToAny's services and accessible labels, with restrained presentation. */
:is(.single-post, .single-event, .fgj-events-index) .addtoany_share_save_container {
 margin: 44px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line);
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_share_save_container::before {
 content: "SHARE / このページを共有"; display: block; margin-bottom: 10px;
 color: var(--muted); font-size: 11px; letter-spacing: .08em;
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list {
 display: flex; flex-wrap: wrap; gap: 4px 16px; line-height: 1.5 !important;
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list > a {
 display: inline-flex !important; align-items: center; justify-content: flex-start; gap: 6px;
 min-width: 44px; min-height: 44px; margin: 0; padding: 4px 0 !important;
 color: #45443f !important; border: 0; border-radius: 0; background: none !important;
 font: 12px/1.5 var(--sans) !important; text-decoration: none;
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list .a2a_svg {
 background: transparent !important; width: 20px !important; height: 20px !important;
 line-height: 20px !important; border-radius: 0; flex: 0 0 20px;
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list svg :is(path,g) { fill: currentColor !important; }
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list .a2a_label {
 position: static !important; width: auto !important; height: auto !important;
 clip: auto !important; clip-path: none !important; overflow: visible !important;
 color: inherit; font: inherit !important; white-space: nowrap;
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list .a2a_3p_button {
 display: inline-flex; align-items: center; gap: 6px; background: transparent !important;
 color: inherit !important; padding: 0 !important; height: auto !important;
 line-height: 1.5 !important; font: inherit !important; border-radius: 0 !important;
}
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list .a2a_3p_label { font: inherit !important; }
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list > a:hover { text-decoration: underline; text-underline-offset: 4px; }
:is(.single-post, .single-event, .fgj-events-index) .addtoany_list > a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@media (max-width: 860px) {
 :is(.single-post, .single-event) .detail-hero { padding: 108px 22px 26px; }
 :is(.single-post, .single-event) .detail-hero h1 { font-size: 24px; line-height: 1.65; letter-spacing: .01em; }
 :is(.single-post, .single-event) .detail-hero__meta { font-size: 9px; margin-bottom: 16px; }
 :is(.single-post, .single-event) .detail-visual { padding-block: 0 26px; }
 :is(.single-post, .single-event) .detail-visual img { max-height: 460px; }
 :is(.single-post, .single-event) .detail-layout { grid-template-columns: minmax(0,1fr); gap: 24px; padding: 30px 22px 60px; }
 :is(.single-post, .single-event) .detail-share { grid-row: 2; }
 .detail-body h2 { font-size: 21px; }
 :is(.blog,.category) .archive-card--wide { display: block; }
 :is(.blog,.category,.single-post) .archive-card :is(h2,h3) { font-size: 20px; }
 .fgj-events-index .em.em-events-list .em-item-title { font-size: 20px !important; }
 :is(.blog,.category,.fgj-events-index) .page-hero { height: 420px; }
 :is(.blog,.category) .page-hero__image { top: 72px; height: calc(100% - 72px); }
 :is(.blog,.category,.fgj-events-index) .page-hero h1 { font-size: 30px; }
 .fgj-events-index .em.em-events-list .em-item { grid-template-columns: minmax(0,1fr); gap: 22px; padding-block: 28px; }
 .fgj-events-index .em.em-events-list .em-item-image { max-width: 420px; margin-inline: auto; }
}

/* Shared reading rhythm: body copy only, never plugin UI or layout galleries. */
:root {
 --fgj-copy-line: 1.85;
 --fgj-copy-gap: 1.35em;
 --fgj-photo-gap: clamp(24px, 3vw, 36px);
 --fgj-copy-width: 720px;
}
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) :is(p, li):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)):not(.wp-caption-text) {
 line-height: var(--fgj-copy-line) !important;
}
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) p:not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)):not(.wp-caption-text) {
 margin-block: 0 var(--fgj-copy-gap) !important;
}
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) :is(p, li):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)) :is(span, strong, em, a, b, i) {
 line-height: inherit !important;
}
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) img:not(:where(.emoji, .wp-smiley, .avatar, .custom-logo, .icon, [role="presentation"], [src$=".svg"], [width="16"], [width="20"], [width="24"], [width="32"])):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)) {
 display: block; float: none; width: auto !important; height: auto !important;
 max-width: min(100%, var(--fgj-copy-width)); max-height: 800px;
 object-fit: contain; margin: var(--fgj-photo-gap) auto;
}
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) :is(figure.wp-block-image, figure:has(> img), figure:has(> a > img), figure:has(> picture > img), .wp-caption):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)) {
 float: none; width: auto !important; max-width: min(100%, var(--fgj-copy-width));
 margin: var(--fgj-photo-gap) auto !important;
}
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) :is(figure, .wp-caption) img:not(:where(.emoji, .wp-smiley, .avatar, .custom-logo, .icon, [role="presentation"], [src$=".svg"], [width="16"], [width="20"], [width="24"], [width="32"])):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)) { margin-block: 0; }
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) img:not(:where(.emoji, .wp-smiley, .avatar, .custom-logo, .icon, [role="presentation"], [src$=".svg"], [width="16"], [width="20"], [width="24"], [width="32"])):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)) + br { display: none; }
:is(.single-post .detail-body, .single-event .em-event-content, .fgj-editor-content .entry-content) :is(figcaption, .wp-caption-text):not(:where(.gallery *, .wp-block-gallery *, .wp-block-columns *, .wp-block-media-text *, .elementor-widget-image-carousel *, .elementor-widget-gallery *, .elementor-widget-icon *, .elementor-widget-site-logo *, .addtoany_share_save_container *, .detail-actions *, .detail-data *, .em-booking *, .em-booking-form *, .em-event-meta *, .fc *, form *, table *)) {
 margin: 12px 0 0 !important; font-size: 13px !important; line-height: 1.7 !important;
 color: #70685f; text-align: center;
}
/* Existing designed pages use the same reading rhythm; display copy stays as designed. */
.page-intro__body > p,
.statement__body > p,
.company__body > p,
.community__body > p:not(.community__note),
.founder__body > p:not(.founder__role):not(.founder__quote),
.about-purpose__body > p:not(.about-purpose__lead),
.about-beliefs__copy > p,
.about-belief__body > p:last-child,
.about-people__body > p,
.about-story__heading > p,
.about-story__origin > div > p:not(.about-story__label),
.about-story__future > p:not(.about-story__label),
.story-origin__body > p,
.story-future__grid > div > p {
 line-height: var(--fgj-copy-line);
 margin-block-end: var(--fgj-copy-gap);
}
