/* Native block settings own layout, typography, spacing, borders and responsive overrides.
 * CSS supplies mode tokens, paper artwork, conditional image layout, motion,
 * focus treatment, icon states and details without native block controls.
 * Legacy class aliases preserve selectors for existing saved markup.
 */

:root,
.editor-styles-wrapper {
    color-scheme: light dark;
    --gijinkakuncore-background: light-dark(#fff, #000);
    --gijinkakuncore-foreground: light-dark(#000, #fff);
    --gijinkakuncore-note-paper: light-dark(#fff7d5, #282720);
    --gijinkakuncore-note-paper-alt: light-dark(#fff3e5, #292520);
    --gijinkakuncore-note-ink: light-dark(#202638, #f3ecdf);
    --gijinkakuncore-note-lines: light-dark(rgb(184 158 89 / 10%), rgb(255 233 170 / 7%));
    --gijinkakuncore-note-category: light-dark(#c2410c, #ffb176);
    --gijinkakuncore-note-tape: light-dark(rgb(225 195 157 / 60%), rgb(177 149 108 / 50%));
    --gijinkakuncore-note-fold-start: light-dark(#f1dec7, #40382e);
    --gijinkakuncore-note-fold-end: light-dark(#fffaf2, #665341);
    --gijinkakuncore-note-shadow: light-dark(rgb(55 39 14 / 15%), rgb(0 0 0 / 35%));
}

:root[data-gijinkakuncore-mode="light"],
.editor-styles-wrapper {
    color-scheme: light;
}

:root[data-gijinkakuncore-mode="dark"] {
    color-scheme: dark;
}

html {
    font-size: 100%;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

:where(img, video) {
    max-inline-size: 100%;
    block-size: auto;
}

:where(h1, h2, h3, h4, h5, h6) {
    text-wrap: balance;
    overflow-wrap: anywhere;
}

:where(p, li) {
    overflow-wrap: anywhere;
}

a {
    text-underline-offset: 0.2em;
    text-decoration-thickness: 0.08em;
}

:where(a, button, input, textarea, select):focus-visible {
    outline: 0.125rem solid currentColor;
    outline-offset: 0.25rem;
}

pre {
    overflow-x: auto;
}

.gijinkakuncore-header {
    position: relative;
    & :is(.gijinkakuncore-header__controls, .gijinkakuncore-controls) {
        position: absolute;
        inset: 1.25rem 1rem auto auto;
        margin: 0;
    }
}

:is(.gijinkakuncore-header__identity, .gijinkakuncore-identity) {
    & > .wp-block-site-logo {
        flex-shrink: 0;
    }
    & .wp-block-site-logo img {
        aspect-ratio: 1;
        object-fit: cover;
    }
    /* SVG attachments may have no dimensions, so Site Logo cannot emit its width. */
    & .wp-block-site-logo img:not([width]) {
        width: 4.75rem;
        @media (max-width: 40.625rem) {
            width: 3.5rem;
        }
    }
    @media (max-width: 40.625rem) {
        & .wp-block-site-logo img {
            width: 3.5rem;
        }
    }
}

.gijinkakuncore-toggle {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--gijinkakuncore-foreground);
    cursor: pointer;
    &[hidden] {
        display: none;
    }
    & img {
        grid-area: 1 / 1;
        width: 1.625rem;
        height: 1.625rem;
    }
    & :is(.gijinkakuncore-toggle__moon, .gijinkakuncore-moon) {
        display: block;
    }
    & :is(.gijinkakuncore-toggle__sun, .gijinkakuncore-sun) {
        display: none;
    }
    &[aria-pressed="true"] :is(.gijinkakuncore-toggle__moon, .gijinkakuncore-moon) {
        display: none;
    }
    &[aria-pressed="true"] :is(.gijinkakuncore-toggle__sun, .gijinkakuncore-sun) {
        display: block;
    }
    &:hover {
        opacity: 0.8;
    }
    &:disabled {
        cursor: default;
    }
}

:is(.gijinkakuncore-header__navigation, .gijinkakuncore-inner-navigation) {
    & .wp-block-navigation-item__content {
        text-underline-offset: 0.3em;
    }
    & .current-menu-item > .wp-block-navigation-item__content {
        text-decoration: underline;
        text-decoration-color: #ff641d;
        text-decoration-thickness: 0.125rem;
    }
}

.gijinkakuncore-footer {
    container: gijinkakuncore-footer / inline-size;
    align-items: center;
    & > * {
        margin: 0;
    }
    & .wp-block-social-links {
        justify-self: end;
    }
    @media (max-width: 30rem) {
        & .wp-block-social-links {
            justify-self: start;
        }
    }
}

:is(.gijinkakuncore-footer__copyright, .gijinkakuncore-copyright) {
    opacity: 0.75;
    & a {
        text-decoration: none;
    }
}

:is(.gijinkakuncore-footer__contact, .gijinkakuncore-contact) {
    & a {
        text-decoration: none;
        border-bottom: 0.125rem solid #ff641d;
        padding-bottom: 0.15rem;
    }
}

.wp-block-social-links {
    & .wp-social-link a {
        min-inline-size: 2.75rem;
        min-block-size: 2.75rem;
        justify-content: center;
    }
}

.gijinkakuncore-post-stack {
    & > li {
        min-width: 0;
        width: 100%;
    }
    & > li:nth-child(even) .gijinkakuncore-note {
        --note-paper: var(--gijinkakuncore-note-paper-alt);
        --note-fold-size: 1.65rem;
        --note-rotation: 0.8deg;
        --note-hover-rotation: -0.6deg;
        background:
                linear-gradient(45deg, var(--gijinkakuncore-note-fold-start), var(--gijinkakuncore-note-fold-end) 49.5%, transparent 50%) top right / var(--note-fold-size) var(--note-fold-size) no-repeat,
                linear-gradient(225deg, transparent calc(var(--note-fold-size) / 1.41421356237), var(--note-paper) 0);
        --wp--preset--shadow--paper-note: none;
        filter: drop-shadow(0 0.375rem 0.4375rem var(--gijinkakuncore-note-shadow));
    }
    & > li:nth-child(even) .gijinkakuncore-note::after {
        opacity: 0.85;
        mask-image: linear-gradient(225deg, transparent calc(var(--note-fold-size) / 1.41421356237), #000 0);
    }
    @media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
        & > li:hover .gijinkakuncore-note {
            translate: 0 -0.25rem;
            rotate: var(--note-hover-rotation);
        }
    }
    @media (max-width: 30rem) {
        & > li:nth-child(even) .gijinkakuncore-note {
            --note-rotation: 0deg;
        }
    }
}

.gijinkakuncore-note {
    --note-paper: var(--gijinkakuncore-note-paper);
    --note-lines: var(--gijinkakuncore-note-lines);
    --note-rotation: -1deg;
    --note-hover-rotation: 0.6deg;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin: 0;
    background: repeating-linear-gradient(0deg, transparent 0 1.6875rem, var(--note-lines) 1.75rem 1.8125rem), var(--note-paper);
    transform: rotate(var(--note-rotation));
    isolation: isolate;
    &:has(> .wp-block-post-featured-image) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    }
    &::before {
        content: '';
        position: absolute;
        top: -0.8rem;
        left: calc(50% - 2rem);
        width: 4rem;
        height: 1.7rem;
        background: repeating-linear-gradient(115deg, transparent 0 0.4375rem, rgb(179 136 83 / 6%) 0.5rem 0.5625rem), var(--gijinkakuncore-note-tape);
        box-shadow: 0 0.0625rem 0.125rem rgb(84 57 21 / 8%);
        transform: rotate(3deg);
        pointer-events: none;
    }
    &::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: url('../images/paper-grain.svg') repeat;
        background-size: 15rem 15rem;
        opacity: 0.5;
        pointer-events: none;
    }
    & > * {
        margin: 0;
        min-width: 0;
    }
    & .wp-block-post-excerpt p {
        margin: 0;
    }
    & .wp-block-read-more {
        display: inline-block;
    }
    & .wp-block-post-featured-image img {
        display: block;
        width: 100%;
    }
    @media (prefers-reduced-motion: no-preference) {
        & {
            transition: translate 200ms ease-out, rotate 200ms ease-out;
        }
        &:focus-within {
            translate: 0 -0.25rem;
            rotate: var(--note-hover-rotation);
        }
    }
    @media (max-width: 40.625rem) {
        & {
            gap: 1.25rem;
        }
    }
    @media (max-width: 30rem) {
        & {
            --note-rotation: 0deg;
        }
        &:has(> .wp-block-post-featured-image) {
            grid-template-columns: minmax(0, 1fr);
        }
        & .wp-block-post-featured-image img {
            aspect-ratio: 3 / 2;
            object-fit: cover;
        }
    }
}

:where(:is(.gijinkakuncore-note__copy, .gijinkakuncore-note-copy) > *) {
    margin: 0;
}

:is(.gijinkakuncore-note__category, .gijinkakuncore-note-category) a,
.gijinkakuncore-note .wp-block-post-title a {
    text-decoration: none;
}

:is(.gijinkakuncore-posts__heading, .gijinkakuncore-posts-heading) {
    & a {
        display: inline-block;
        padding-block-end: 0.15rem;
        border-bottom: 0.125rem solid #ff641d;
        text-decoration: none;
    }
    & + .gijinkakuncore-post-stack {
        margin-block-start: 0;
    }
}

.is-style-gijinkakuncore-paper-notes {
    container: gijinkakuncore-notes / inline-size;
    /* A narrow containing block can be smaller than the page viewport. */
    @container gijinkakuncore-notes (max-width: 49.999rem) {
        & .gijinkakuncore-post-stack {
            grid-template-columns: minmax(0, 1fr);
        }
    }
    @container gijinkakuncore-notes (max-width: 30rem) {
        & .gijinkakuncore-post-stack > li .gijinkakuncore-note {
            --note-rotation: 0deg;
        }
        & .gijinkakuncore-note:has(> .wp-block-post-featured-image) {
            grid-template-columns: minmax(0, 1fr);
        }
    }
}

.wp-block-social-link {
    @media (prefers-reduced-motion: reduce) {
        & {
            transition: none;
        }
    }
}

:root, :root[data-gijinkakuncore-mode] {
    @media print {
        & {
            color-scheme: light;
        }
    }
}

:is(.gijinkakuncore-header__controls, .gijinkakuncore-controls) {
    @media print {
        & {
            display: none;
        }
    }
}

:is(.gijinkakuncore-single__meta, .gijinkakuncore-post-meta) {
    & > .wp-block-avatar {
        flex-shrink: 0;
        margin: 0;
    }
}

:is(.gijinkakuncore-single__byline, .gijinkakuncore-post-byline) {
    min-inline-size: 0;
}

:is(.gijinkakuncore-single__dates, .gijinkakuncore-post-dates) {
    & > * {
        margin: 0;
    }
}

:is(.gijinkakuncore-single__navigation, .gijinkakuncore-post-navigation) {
    /* Post Navigation Link has no native spacing support. */
    & .post-navigation-link-next {
        margin-inline-start: auto;
    }

    & > * {
        min-inline-size: 0;
        max-inline-size: 100%;
    }
    & a {
        overflow-wrap: anywhere;
    }
}

/* Relational typography and decorative quote marks have no equivalent block control. */

.wp-block-post-content {
    & :where(.wp-block-heading):not(:first-child) {
        margin-block-start: var(--wp--custom--rhythm--heading);
    }
    & > :first-child {
        margin-block-start: 0;
    }
    & :where(.wp-block-list) > li + li {
        margin-block-start: 0.35em;
    }
}

.wp-block-post-content :is(h1, h2, h3, h4, h5, h6) + :where(p, ul, ol, blockquote, pre, figure) {
    margin-block-start: clamp(0.75rem, 0.625rem + 0.5vw, 1.125rem);
}

:where(.has-large-font-size) {
    line-height: 1.5;
}

.wp-block-post-content :where(p, ul, ol, blockquote, pre, figure) + :is(p, ul, ol, blockquote, pre, figure) {
    margin-block-start: var(--wp--custom--rhythm--flow);
}

.wp-block-quote {
    position: relative;
    &::before {
        content: '\201c' / '';
        position: absolute;
        inset-inline-start: 0.25rem;
        inset-block-start: 0.15rem;
        font-family: var(--wp--preset--font-family--handwritten);
        font-size: clamp(2.75rem, 2.25rem + 2vw, 4rem);
        font-weight: 400;
        line-height: 1;
        color: #ff641d;
        pointer-events: none;
    }
    & > p {
        margin-block: 0;
    }
    & > p + p {
        margin-block-start: 0.75em;
    }
    & > p:last-of-type::after {
        content: '\201d' / '';
        color: #ff641d;
    }
    & > cite {
        display: block;
        margin-block-start: 1rem;
        font-family: var(--wp--preset--font-family--inter);
        font-size: var(--wp--preset--font-size--small);
        font-weight: 500;
        font-style: normal;
        line-height: 1.4;
        letter-spacing: 0;
    }
}

.is-style-gijinkakuncore-card-title {
    & a {
        font-weight: inherit;
    }
}

.is-style-polaroid figcaption, .gijinkakuncore-polaroid figcaption {
    font-family: var(--wp--preset--font-family--handwritten);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
}

.is-style-gijinkakuncore-handwritten {
    & a {
        font-weight: inherit;
    }
}

/* Keep the short section action together inside the native no-wrap Row. */
:is(.gijinkakuncore-posts__link, .gijinkakuncore-posts-link) {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Match the notes' 50rem container breakpoint; native viewport settings handle tablet/mobile. */
@container gijinkakuncore-footer (max-width: 49.999rem) {
    .gijinkakuncore-footer > :is(.wp-block-navigation, .wp-block-social-links, .wp-block-gijinkakuncore-copyright) {
        grid-column: 1 / -1;
        justify-self: center;
        justify-content: center;
        text-align: center;
    }
    .gijinkakuncore-footer > .wp-block-navigation {
        grid-row: 1;
    }
    .gijinkakuncore-footer > .wp-block-social-links {
        grid-row: 2;
    }
    .gijinkakuncore-footer > .wp-block-gijinkakuncore-copyright {
        grid-row: 3;
    }
}

/* Intro pattern: native Groups, Heading, Paragraphs and Image remain editable. */
.gijinkakuncore-intro {
    container: gijinkakuncore-intro / inline-size;
    margin-block-end: var(--wp--custom--rhythm--section);
}

.gijinkakuncore-intro__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.5rem, 4cqi, 3rem);
    & > * {
        min-inline-size: 0;
        margin-block: 0;
    }
}

.gijinkakuncore-intro__copy {
    & > * {
        margin-block: 0;
    }
    & > * + * {
        margin-block-start: 1.25rem;
    }
    & .gijinkakuncore-intro__title {
        margin-block: 0;
        font-size: clamp(2.25rem, 5.8cqi, 4.25rem);
        line-height: 1.04;
        letter-spacing: -0.045em;
        text-wrap: initial;
    }
}

.gijinkakuncore-intro__art {
    position: relative;
    & .gijinkakuncore-intro__fox {
        margin: 0;
    }
    & img {
        display: block;
        width: 100%;
        max-height: 30rem;
        object-fit: contain;
    }
    &::after {
        content: '';
        position: absolute;
        inset: 13% 3% auto auto;
        width: 1.5rem;
        height: 1.5rem;
        background: #ff641d;
        clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
        pointer-events: none;
    }
}

.gijinkakuncore-intro__links {
    line-height: 2;
    & a {
        display: inline;
        padding: 0.15em 0.3em;
        border-radius: 0.15rem;
        color: #202638;
        background: var(--intro-highlight, #ffb98c);
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
        text-decoration: none;
        white-space: nowrap;
    }
    & a:hover {
        text-decoration: underline;
    }
    & .gijinkakuncore-intro__about { --intro-highlight: #e7d8ff; }
    & .gijinkakuncore-intro__projects { --intro-highlight: #dff0bf; }
    & .gijinkakuncore-intro__streams { --intro-highlight: #ceeafa; }
    & .gijinkakuncore-intro__blog { --intro-highlight: #fff0b0; }
}

@container gijinkakuncore-intro (max-width: 43rem) {
    .gijinkakuncore-intro__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
    /* Put the illustration beside the introduction in reading order, not after the bio. */
    .gijinkakuncore-intro__copy { display: contents; }
    .gijinkakuncore-intro__layout .gijinkakuncore-intro__copy > * {
        min-inline-size: 0;
        margin-block: 0;
    }
    .gijinkakuncore-intro__copy .gijinkakuncore-intro__title {
        grid-column: 1;
        grid-row: 1;
        font-size: clamp(2rem, 9cqi, 3.5rem);
    }
    .gijinkakuncore-intro__copy > .has-large-font-size {
        grid-column: 1;
        grid-row: 2;
        line-height: 1.45;
    }
    .gijinkakuncore-intro__art {
        grid-column: 1;
        grid-row: 3;
        inline-size: min(100%, 19rem);
        justify-self: center;
    }
    .gijinkakuncore-intro__art .gijinkakuncore-intro__fox {
        aspect-ratio: 1;
        overflow: hidden;
        /* A larger portrait of the fox, with a soft edge below the folded arms. */
        mask-image: linear-gradient(#000 84%, transparent 100%);
    }
    .gijinkakuncore-intro__art img {
        inline-size: 100%;
        block-size: 100%;
        max-height: none;
        object-fit: cover;
        object-position: center top;
    }
    .gijinkakuncore-intro__art::after { inset: 12% 0 auto auto; }
    .gijinkakuncore-intro__links { line-height: 2.1; }
}

/* About: Creative journey. All copy is native editable Gutenberg text. */
.gijinkakuncore-journey {
    --journey-ink: light-dark(#10102c, #f4f0ff);
    --journey-paper: light-dark(#fffaf3, #27231f);
    --journey-edge: light-dark(#e9dfd2, #484039);
    container: creative-journey / inline-size;
    color: var(--journey-ink);
    & :is(p, figure, .wp-block-group) { margin-block: 0; }
    & :where(h1, h2, h3) { color: var(--gijinkakuncore-foreground); }
    & p { line-height: 1.4; }
    & > .wp-block-group + .wp-block-group { margin-block-start: 2.5rem; }
    & .wp-block-heading { margin-block: 0; }
    & h2 { font-size: clamp(1.875rem, 4.3cqi, 2.875rem); line-height: 1.1; }
    & figure { margin-inline: 0; }
    & img { display: block; width: 100%; }
}

.gijinkakuncore-journey__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 1.25rem;
    & > * { min-inline-size: 0; }
}
.gijinkakuncore-journey .gijinkakuncore-journey__intro {
    & > * + * { margin-block-start: 0.8rem; }
    & .gijinkakuncore-journey__title {
        font-size: clamp(2.25rem, 5.8cqi, 3.75rem);
        line-height: 0.99;
        letter-spacing: -0.045em;
        text-wrap: initial;
    }
    & .gijinkakuncore-journey__lead {
        font-size: clamp(1.125rem, 2.15cqi, 1.375rem);
        font-weight: 600;
        line-height: 1.2;
    }
    & > p:not(.gijinkakuncore-journey__lead) { font-size: 1rem; }
}
.gijinkakuncore-journey__studio img { object-fit: contain; }
.gijinkakuncore-journey__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.gijinkakuncore-journey__badge,
.gijinkakuncore-journey__interest {
    background: var(--journey-badge, #ffedcd);
    color: #10102c;
    padding: 0.45rem 0.6rem;
    border-radius: 0.65rem;
    font-weight: 600;
}
.gijinkakuncore-journey__badge { font-size: 0.6875rem; padding: 0.4rem; }
.gijinkakuncore-journey__badge--purple { --journey-badge: #e6dcff; }
.gijinkakuncore-journey__badge--yellow { --journey-badge: #fff0cc; }
.gijinkakuncore-journey__badge--blue { --journey-badge: #cdefff; }
.gijinkakuncore-journey__badge--green { --journey-badge: #e2f3d6; }
.gijinkakuncore-journey__badge--peach { --journey-badge: #ffebe0; }

.gijinkakuncore-journey__section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-block-end: 1.75rem !important;
}
.gijinkakuncore-journey__aside {
    border-bottom: 0.125rem solid #ff641d;
    padding-block-end: 0.2rem;
    font-size: 1rem;
    color: var(--gijinkakuncore-foreground);
}
.gijinkakuncore-journey__cards {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 1.5rem 0.9rem;
    align-items: stretch;
}
.gijinkakuncore-journey__card {
    position: relative;
    grid-column: span 4;
    min-inline-size: 0;
    padding: 0.65rem 0.65rem 0.9rem;
    border: 1px solid var(--journey-edge);
    border-radius: 0.8rem;
    background: var(--journey-paper);
    box-shadow: 0 0.2rem 0.35rem var(--gijinkakuncore-note-shadow);
    rotate: -1deg;
    & > .wp-block-image { margin-block-end: 0.6rem; }
    & img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0.3rem; }
    & h3 { font-size: clamp(1rem, 1.8cqi, 1.1875rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.04em; }
    & > p:last-child { margin-block-start: 0.35rem; font-size: 0.8125rem; line-height: 1.25; }
    &:nth-child(even) { rotate: 0.7deg; }
    &:nth-child(n+6) { grid-column: span 5; }
    & .gijinkakuncore-journey__date {
        position: absolute;
        top: -0.65rem;
        left: 0.65rem;
        z-index: 1;
        padding: 0.25rem 0.6rem;
        border-radius: 0.4rem;
        font-size: 0.875rem;
        font-weight: 700;
        line-height: 1.3;
        color: #111;
        background: var(--journey-date, #ffd4b1);
        rotate: -5deg;
    }
}
.gijinkakuncore-journey__date--purple { --journey-date: #e5c8ff; }
.gijinkakuncore-journey__date--yellow { --journey-date: #ffe7a8; }
.gijinkakuncore-journey__date--peach { --journey-date: #ffd4b1; }

.gijinkakuncore-journey__beyond {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 1rem;
    & > * { min-inline-size: 0; }
}
.gijinkakuncore-journey .gijinkakuncore-journey__work,
.gijinkakuncore-journey .gijinkakuncore-journey__hobbies {
    & > * + * { margin-block-start: 0.8rem; }
    & > p { font-size: 0.9375rem; }
}
.gijinkakuncore-journey__services {
    display: grid;
    gap: 0.75rem;
    & p { font-size: 0.875rem; font-weight: 700; }
}
.gijinkakuncore-journey__outdoors { align-self: end; }
.gijinkakuncore-journey__interests {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    & p { font-size: 0.8125rem; padding: 0.75rem 0.5rem; }
    & p:last-child { grid-column: 1 / -1; justify-self: center; }
}
.gijinkakuncore-journey__closing {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    min-height: 12rem;
    padding: 1rem;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1.5rem;
    & .gijinkakuncore-journey__campfire:has(img) {
        position: absolute;
        inset: 0;
        z-index: -1;
        & img { width: 100%; height: 100%; object-fit: cover; }
    }
}
.gijinkakuncore-journey .gijinkakuncore-journey__closing-copy {
    grid-column: 2;
    padding: 1.5rem 1.75rem;
    position: relative;
    isolation: isolate;
    background: #fff5df;
    &:has(> .gijinkakuncore-journey__paper img) { background: transparent; }
    & > .gijinkakuncore-journey__paper:has(img) {
        position: absolute;
        inset: 0;
        z-index: -1;
        margin: 0;
        pointer-events: none;
        & img { width: 100%; height: 100%; object-fit: fill; }
    }
    color: #10102c;
    text-align: center;
    & .gijinkakuncore-journey__closing-title {
        color: #111;
        font-family: var(--wp--preset--font-family--handwritten);
        font-size: clamp(1.5rem, 3.5cqi, 2.375rem);
        font-weight: 400;
        line-height: 1.15;
        letter-spacing: -0.02em;
    }
    & p { margin-block-start: 0.7rem; font-size: 0.9375rem; line-height: 1.3; }
}

/* Allow the illustrated cards room to breathe on laptops and tablets. */
@container creative-journey (max-width: 59.999rem) {
    .gijinkakuncore-journey__cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.75rem 1rem;
    }
    .gijinkakuncore-journey__card:nth-child(n) { grid-column: auto; }
    .gijinkakuncore-journey__card > p:last-child { font-size: 0.9375rem; line-height: 1.45; }
    .gijinkakuncore-journey__beyond { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem; }
    .gijinkakuncore-journey__outdoors {
        grid-column: 1 / -1;
        grid-row: 2;
        inline-size: min(100%, 18rem);
        justify-self: center;
    }
    .gijinkakuncore-journey__hobbies { grid-column: 2; grid-row: 1; }
}
@container creative-journey (max-width: 48rem) {
    .gijinkakuncore-journey__hero { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .gijinkakuncore-journey .gijinkakuncore-journey__intro { display: contents; }
    .gijinkakuncore-journey__hero .gijinkakuncore-journey__intro > * { margin-block: 0; min-inline-size: 0; }
    .gijinkakuncore-journey .gijinkakuncore-journey__intro .gijinkakuncore-journey__title {
        grid-row: 1;
        font-size: clamp(2rem, 8.8cqi, 3.5rem);
        line-height: 1.05;
    }
    .gijinkakuncore-journey__intro .gijinkakuncore-journey__lead { grid-row: 2; line-height: 1.45; }
    .gijinkakuncore-journey__studio { grid-row: 3; inline-size: 100%; max-width: 34rem; justify-self: center; }
    .gijinkakuncore-journey__badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
    .gijinkakuncore-journey__badge { font-size: 0.8125rem; padding: 0.65rem; }
    .gijinkakuncore-journey__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gijinkakuncore-journey__card h3 { font-size: 1.1875rem; line-height: 1.2; }
    .gijinkakuncore-journey__closing { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); }
}
@container creative-journey (max-width: 36rem) {
    .gijinkakuncore-journey__section-heading { align-items: start; flex-direction: column; gap: 0.65rem; }
    .gijinkakuncore-journey__aside { font-size: 0.875rem; }
    .gijinkakuncore-journey__cards { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .gijinkakuncore-journey__card:nth-child(n) {
        display: grid;
        grid-template-columns: minmax(4.5rem, 0.36fr) minmax(0, 1fr);
        gap: 0.6rem 0.85rem;
        rotate: 0deg;
        padding: 1rem;
        align-items: start;
    }
    .gijinkakuncore-journey__card .gijinkakuncore-journey__date {
        position: static;
        grid-column: 1 / -1;
        justify-self: start;
        max-inline-size: 100%;
        margin: 0 0 0.35rem;
        rotate: -3deg;
        font-size: 0.8125rem;
    }
    .gijinkakuncore-journey__card > .wp-block-image { grid-column: 1; grid-row: 2 / 4; margin: 0; }
    .gijinkakuncore-journey__card img { aspect-ratio: 1; }
    .gijinkakuncore-journey__card h3 { grid-column: 2; font-size: 1.125rem; line-height: 1.2; letter-spacing: -0.025em; }
    .gijinkakuncore-journey__card > p:last-child { grid-column: 2; font-size: 0.9375rem; line-height: 1.45; margin: 0; }
    .gijinkakuncore-journey__beyond {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    .gijinkakuncore-journey .gijinkakuncore-journey__work { display: contents; }
    .gijinkakuncore-journey__beyond .gijinkakuncore-journey__work > * { margin-block: 0; }
    .gijinkakuncore-journey__work > .wp-block-heading { grid-column: 1; grid-row: 1; }
    .gijinkakuncore-journey__work > p { grid-column: 1; grid-row: 2; }
    .gijinkakuncore-journey__services { grid-column: 1 / -1; grid-row: 3; }
    .gijinkakuncore-journey__outdoors {
        grid-column: 2;
        grid-row: 1 / 3;
        position: relative;
        inline-size: 100%;
        min-block-size: 0;
        max-inline-size: none;
        align-self: stretch;
        justify-self: stretch;
        overflow: hidden;
        & img {
            position: absolute;
            inset: 0;
            inline-size: 100%;
            block-size: 100%;
            object-fit: cover;
            object-position: center;
        }
    }
    .gijinkakuncore-journey .gijinkakuncore-journey__hobbies {
        grid-column: 1 / -1;
        grid-row: 4;
        margin-block-start: 1.5rem;
    }
    .gijinkakuncore-journey__work > p,
    .gijinkakuncore-journey__hobbies > p { font-size: 1rem; line-height: 1.5; }
    .gijinkakuncore-journey__services p { font-size: 0.9375rem; }
    .gijinkakuncore-journey__interests { gap: 0.65rem; }
    .gijinkakuncore-journey__interests p { font-size: 0.875rem; padding: 0.75rem; }
    .gijinkakuncore-journey__closing { grid-template-columns: minmax(0, 1fr); padding: 0; border-radius: 1rem; }
    .gijinkakuncore-journey__closing .gijinkakuncore-journey__campfire:has(img) {
        position: relative;
        inset: auto;
        z-index: auto;
        grid-column: 1;
        & img { aspect-ratio: 16 / 9; height: auto; object-fit: cover; object-position: left center; }
    }
    .gijinkakuncore-journey .gijinkakuncore-journey__closing-copy {
        grid-column: 1;
        padding: 1.75rem 1.5rem;
        margin: -1.25rem 0.25rem 0.25rem;
        & p { font-size: 1rem; line-height: 1.45; }
    }
}

/* Small service icons are CSS artwork; the labels remain ordinary text blocks. */
.gijinkakuncore-journey__services {
    & p { display: flex; align-items: center; gap: 0.75rem; }
    & p::before {
        content: '';
        flex: 0 0 1.75rem;
        height: 1.75rem;
        background: #7948b5;
        mask: var(--journey-icon) center / contain no-repeat;
    }
    & p:nth-child(1) { --journey-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='5' width='26' height='22' rx='3' fill='none' stroke='black' stroke-width='3'/%3E%3Cpath d='M3 12h26' stroke='black' stroke-width='3'/%3E%3Ccircle cx='7' cy='8.5' r='1'/%3E%3Ccircle cx='11' cy='8.5' r='1'/%3E%3C/svg%3E"); }
    & p:nth-child(2)::before { content: 'W'; mask: none; background: none; color: #7948b5; border: 2px solid currentColor; border-radius: 50%; font: 700 1.5rem/1.55rem Georgia, serif; text-align: center; }
    & p:nth-child(3) { --journey-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M2 10 16 3 30 10 16 17ZM2 17l14 7 14-7M2 24l14 7 14-7' fill='none' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
    & p:nth-child(4) { --journey-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='m11 21 14-17q5-3 3 3L16 25ZM12 21q8 8-9 8 5-2 4-5t5-3' fill='black'/%3E%3C/svg%3E"); }
    & p:nth-child(5) { --journey-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='m1 10 15-7 15 7-15 7ZM7 17v8q9 6 18 0v-8' fill='black'/%3E%3Cpath d='M29 12v14' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
}

/* Keep empty image upload controls usable until Media Library images are selected. */
.gijinkakuncore-journey__closing > .gijinkakuncore-journey__campfire:not(:has(img)) {
    grid-column: 1 / -1;
}
.gijinkakuncore-journey__closing-copy > .gijinkakuncore-journey__paper:not(:has(img)) {
    margin-block-end: 1rem;
}

/* CSS-only timeline entrance and paper-card hover effects. */
@keyframes gijinkakuncore-journey-enter {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    /* Browsers without scroll timelines use a brief entrance on page load. */
    .gijinkakuncore-journey__card {
        animation: gijinkakuncore-journey-enter 550ms cubic-bezier(0.22, 1, 0.36, 1) both;
        transition: translate 220ms ease, rotate 220ms ease, box-shadow 220ms ease;
    }
    .gijinkakuncore-journey__card:nth-child(5n + 2) { animation-delay: 60ms; }
    .gijinkakuncore-journey__card:nth-child(5n + 3) { animation-delay: 120ms; }
    .gijinkakuncore-journey__card:nth-child(5n + 4) { animation-delay: 180ms; }
    .gijinkakuncore-journey__card:nth-child(5n) { animation-delay: 240ms; }

    @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
        .gijinkakuncore-journey__card:nth-child(n) {
            animation-duration: auto;
            animation-delay: 0s;
            animation-timing-function: ease-out;
            animation-timeline: view(block);
            animation-range: entry 0% entry 100%;
        }
    }

    .gijinkakuncore-journey__card:focus-within {
        opacity: 1;
        transform: none;
        animation: none;
        translate: 0 -0.35rem;
        rotate: 0deg;
        box-shadow: 0 0.65rem 1.1rem var(--gijinkakuncore-note-shadow);
    }
    .gijinkakuncore-journey__interest,
    .gijinkakuncore-journey__badge {
        transition: translate 180ms ease;
    }
    @media (hover: hover) and (pointer: fine) {
        .gijinkakuncore-journey__card:hover {
            translate: 0 -0.35rem;
            rotate: 0deg;
            box-shadow: 0 0.65rem 1.1rem var(--gijinkakuncore-note-shadow);
        }
        .gijinkakuncore-journey__interest:hover,
        .gijinkakuncore-journey__badge:hover {
            translate: 0 -0.15rem;
        }
    }
}

/* Keep the editor stable while arranging blocks, and show all cards in print. */
.editor-styles-wrapper .gijinkakuncore-journey__card:nth-child(n) {
    animation: none;
    transition: none;
}
@media print {
    .gijinkakuncore-journey__card:nth-child(n) {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* Phone gutters leave enough width for the illustrations and readable text. */
@media (max-width: 37.5rem) {
    body, .editor-styles-wrapper {
        --wp--custom--rhythm--gutter: 1.25rem;
        --wp--style--root--padding-left: 1.25rem;
        --wp--style--root--padding-right: 1.25rem;
    }
    /* Override the saved template’s inline section margin at phone widths. */
    .gijinkakuncore-main { margin-top: 2rem !important; }
}
