:root {
    --bg: #f4f7fb;
    --paper: #ffffff;
    --text: #151515;
    --muted: #6e6b65;
    --line: #d9d6cf;
    --serif: "Playfair Display", Georgia, serif;
    --sans: "DM Sans", "Noto Sans JP", Arial, sans-serif;
    --page: min(100% - 48px, 1360px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: clip;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
     ページローダー
     ============================================= */
body.is-loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100svh;
    background: var(--bg);
    opacity: 1;
    visibility: visible;
}

.page-loader__inner {
    width: min(420px, calc(100vw - 48px));
    text-align: center;
}

.page-loader__name {
    margin: 0 0 18px;
    font-size: clamp(16px, 1.5vw, 22px);
    font-weight: 500;
    letter-spacing: .18em;
}

.page-loader__line {
    width: 100%;
    height: 1px;
    overflow: hidden;
    background: rgba(21, 21, 21, .14);
}

.page-loader__line span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left center;
}

.page-loader__label {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .22em;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility .45s ease;
}


/* =============================================
     ローディング中：ファーストビューのちらつきを防止
     ============================================= */
body.is-loading .site-header,
body.is-loading .hero-kicker,
body.is-loading .hero-title,
body.is-loading .hero-footer {
    opacity: 0;
    visibility: hidden;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-shell {
    width: var(--page);
    margin-inline: auto;
}

.serif {
    font-family: var(--serif);
    font-weight: 500;
}

.italic {
    font-style: italic;
}

.eyebrow {
    margin: 0 0 28px;
    font-size: 12px;
    letter-spacing: .16em;
}

.site-header {
    width: var(--page);
    margin-inline: auto;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 20;
}

.brand {
    padding: 5px 0;
}

.brand img {
    height: 70px;
    width: auto;
}

.global-nav {
    display: flex;
    gap: 34px;
    font-size: 13px;
}

.global-nav a {
    position: relative;
}

.global-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -4px;
    height: 1px;
    background: currentColor;
    transition: right .28s ease;
}

.global-nav a:hover::after {
    right: 0;
}

.menu-button {
    display: none;
}

.hero {
    min-height: calc(100svh - 92px);
    padding: 80px 0 46px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-kicker {
    font-size: 12px;
    letter-spacing: .18em;
}

.hero-title {
    margin: 40px 0;
    min-height: 1.05em;
    font-size: clamp(64px, 9.3vw, 148px);
    line-height: .92;
    letter-spacing: -.065em;
    font-weight: 500;
    white-space: nowrap;
}

.typewriter-text {
    display: inline;
}

.typewriter-cursor {
    display: inline-block;
    width: .055em;
    height: .82em;
    margin-left: .08em;
    vertical-align: -.02em;
    background: currentColor;
    animation: cursorBlink .8s step-end infinite;
}

@keyframes cursorBlink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.hero-footer p {
    margin: 0;
    max-width: 420px;
    color: var(--muted);
    font-size: 14px;
}

.text-link {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 12px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.works,
.about,
.skills,
.contact {
    padding: 150px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: .65fr 1.5fr 1fr;
    gap: 48px;
    align-items: end;
    margin-bottom: 72px;
}

section.about .section-heading {
    grid-template-columns: .65fr 1.5fr;
}

.section-heading .eyebrow {
    align-self: start;
}

.section-heading h2 {
    font-family: "Dancing Script", cursive;
    margin: 0;
    font-size: clamp(42px, 5.7vw, 84px);
    line-height: .98;
    font-weight: 800;
}

.section-lead {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 430px;
}

.filter-row {
    display: flex;
    gap: 10px;
    padding-bottom: 28px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.filter-button {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 12px;
    cursor: pointer;
    transition: .25s ease;
}

.filter-button:hover,
.filter-button.is-active {
    background: var(--text);
    color: var(--paper);
    border-color: var(--text);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 52px 24px;
    max-width: 1120px;
    margin-inline: auto;
}

.work-card {
    min-width: 0;
    cursor: pointer;
}

.work-card.is-hidden {
    display: none;
}

.work-image,
.work-card[data-category="poster"] .work-image,
.work-card[data-category="logo"] .work-image {
    position: relative;
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 4 / 3;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.work-card[data-category="logo"] .work-image img {
    object-fit: contain;
}

.work-card:hover .work-image img {
    transform: scale(1.025);
}

.work-image::after {
    content: "VIEW";
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, .92);
    padding: 7px 10px;
    font-size: 9px;
    letter-spacing: .14em;
    opacity: 0;
    transform: translateY(8px);
    transition: .3s ease;
}

.work-card:hover .work-image::after {
    opacity: 1;
    transform: translateY(0);
}

.work-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 14px;
    padding-top: 13px;
}

.work-info h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.025em;
}

.work-info span,
.work-info p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.work-info p {
    grid-column: 1 / -1;
}

.about-layout {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(48px, 8vw, 130px);
    align-items: start;
}

.portrait-wrap img {
    width: 75%;
    height: auto;
    object-fit: cover;
}

.portrait-note {
    color: var(--muted);
    font-size: 11px;
    margin-top: 10px;
}

.about-copy {
    padding-top: 7vw;
}

.about-copy p {
    max-width: 620px;
    color: var(--muted);
}

.about-copy .about-intro {
    color: var(--text);
    font-family: var(--serif);
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.25;
    margin-top: 0;
}

.about-meta {
    margin-top: 60px;
    border-top: 1px solid var(--line);
}

.about-meta div {
    display: grid;
    grid-template-columns: 140px 1fr;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.about-meta dt {
    color: var(--muted);
}

.about-meta dd {
    margin: 0;
}

.skills {
    border-top: 1px solid var(--line);
}

.skill-list {
    border-top: 1px solid var(--line);
}

.skill-row {
    display: grid;
    grid-template-columns: 80px 1fr 1.15fr;
    gap: 30px;
    align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
    transition: padding .3s ease;
}

.skill-row:hover {
    padding-left: 12px;
}

.skill-number {
    font-size: 11px;
    color: var(--muted);
}

.skill-row h3 {
    margin: 0;
    font-size: clamp(24px, 3vw, 44px);
    font-weight: 500;
    letter-spacing: -.04em;
}

.skill-row p {
    margin: 0;
    color: var(--muted);
}

.contact {
    border-top: 1px solid var(--line);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 60px;
    align-items: end;
}

.contact-layout #contact-title {
    line-height: 1.1;
}

.contact-layout #contact-title .s-line {
    padding-left: 55px;
}

.contact-layout #contact-title .t-line {
    padding-left: 110px;
}

.contact-layout h2 {
    margin: 0;
    font-size: clamp(45px, 8vw, 144px);
    line-height: .82;
    letter-spacing: -.075em;
    font-weight: 500;
}

.contact-copy {
    padding-bottom: 8px;
}

.contact-copy p {
    color: var(--muted);
    max-width: 420px;
}

.contact-link {
    display: inline-flex;
    gap: 12px;
    margin-top: 28px;
    padding-bottom: 4px;
    border-bottom: 1px solid;
    font-size: 18px;
}

/* Skills / Contact は初期状態で表示し、GSAPでは動きだけを追加する */
.skill-list,
.skill-row,
.contact-eyebrow,
.contact-layout,
.contact-layout h2,
.contact-copy {
    opacity: 1;
    visibility: visible;
}

.contact-layout h2 {
    overflow-wrap: anywhere;
}

.site-footer {
    min-height: 100px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    letter-spacing: .08em;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 32px;
}

.modal.is-open {
    display: grid;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, .55);
    backdrop-filter: blur(5px);
}

.modal-panel {
    position: relative;
    width: min(1280px, 94vw);
    height: min(860px, 92vh);
    max-height: 92vh;
    background: var(--paper);
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
    animation: modalIn .3s ease both;
    z-index: 1;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    cursor: pointer;
    z-index: 3;
    font-size: 23px;
    line-height: 1;
}

.modal-media {
    background: #efede6;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 42px;
    overflow: hidden;
}

.modal-media img {
    width: 100%;
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
}

.modal-content {
    padding: clamp(48px, 5vw, 76px);
    align-self: stretch;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 21, 21, .18) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(21, 21, 21, .18);
    border-radius: 999px;
}

.modal-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.modal-content h2 {
    margin: 28px 0 20px;
    font-size: clamp(40px, 4.5vw, 64px);
    line-height: .95;
    letter-spacing: -.055em;
    font-weight: 500;
}

.modal-summary {
    color: var(--muted);
}

.modal-details {
    margin-top: 44px;
    border-top: 1px solid var(--line);
}

.modal-details div {
    display: grid;
    grid-template-columns: 100px 1fr;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.modal-details dt {
    color: var(--muted);
}

.modal-details dd {
    margin: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.work-card.reveal:nth-child(even) {
    transition-delay: .08s;
}

/* =============================================
     レスポンシブ：タブレット以下（900px以下）
     ============================================= */
@media (max-width: 900px) {
    :root {
        --page: min(100% - 32px, 760px);
    }

    html,
    body {
        overflow-x: clip;
    }

    .site-header {
        min-height: 76px;
    }

    .menu-button {
        display: inline-flex;
        width: 42px;
        height: 42px;
        background: transparent;
        border: 0;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        cursor: pointer;
    }

    .menu-button span:not(.sr-only) {
        display: block;
        width: 24px;
        height: 1px;
        background: var(--text);
        margin-left: auto;
        transition: .3s ease;
    }

    .menu-button[aria-expanded="true"] span:first-child {
        transform: translateY(3.5px) rotate(45deg);
    }

    .menu-button[aria-expanded="true"] span:nth-child(2) {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .global-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        display: none;
        flex-direction: column;
        gap: 0;
    }

    .global-nav.is-open {
        display: flex;
    }

    .global-nav a {
        padding: 16px 20px;
        border-top: 1px solid var(--line);
    }

    .hero {
        min-height: calc(100svh - 76px);
        padding-top: 58px;
    }

    .hero-title {
        font-size: clamp(54px, 11vw, 92px);
        white-space: normal;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .section-heading .eyebrow {
        margin-bottom: 8px;
    }

    .works,
    .about,
    .skills,
    .contact {
        padding: 110px 0;
    }

    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px 18px;
        max-width: 760px;
    }

    .about-layout {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .about-copy {
        padding-top: 0;
    }

    .skill-row {
        grid-template-columns: 52px .8fr 1.2fr;
    }

    .modal {
        padding: 20px;
    }

    .modal-panel {
        width: min(720px, 94vw);
        height: auto;
        max-height: 90vh;
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .modal-close {
        top: 14px;
        right: 14px;
    }

    .modal-media {
        min-height: auto;
        padding: 60px 22px 22px;
    }

    .modal-media img {
        max-height: 48vh;
    }

    .modal-content {
        overflow-y: visible;
    }
}

/* =============================================
     レスポンシブ：スマートフォン（620px以下）
     ============================================= */
@media (max-width: 620px) {
    :root {
        --page: calc(100% - 28px);
    }

    .brand {
        font-size: 16px;
    }

    .hero {
        padding: 42px 0 28px;
    }

    .hero-title {
        margin: 70px 0 46px;
        font-size: clamp(44px, 13.8vw, 72px);
        line-height: .92;
        white-space: normal;
    }

    .hero-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .works,
    .about,
    .skills,
    .contact {
        padding: 88px 0;
    }

    .section-heading {
        margin-bottom: 46px;
    }

    .section-heading h2 {
        font-size: clamp(42px, 13vw, 62px);
    }

    .filter-row {
        overflow-x: auto;
        padding-bottom: 18px;
        scrollbar-width: none;
    }

    .filter-row::-webkit-scrollbar {
        display: none;
    }

    .works-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        gap: 38px;
    }

    .work-card {
        margin-bottom: 0;
    }

    .work-image,
    .work-card[data-category="poster"] .work-image,
    .work-card[data-category="logo"] .work-image {
        aspect-ratio: 4 / 3;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .portrait-wrap {
        justify-content: center;
    }

    .portrait-wrap img {
        width: 100%;
        max-width: 420px;
    }

    .about-copy .about-intro {
        font-size: 31px;
    }

    .about-meta div {
        grid-template-columns: 105px 1fr;
    }

    .skill-row {
        grid-template-columns: 38px 1fr;
        gap: 12px;
    }

    .skill-row p {
        grid-column: 2;
        margin-top: -4px;
        font-size: 13px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .modal {
        padding: 10px;
    }

    .modal-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .modal-media {
        padding: 62px 14px 18px;
    }

    .modal-content {
        padding: 34px 20px 48px;
    }

    .modal-content h2 {
        font-size: 42px;
    }
}

/* =============================================
     アクセシビリティ：動きを減らす設定
     ============================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .typewriter-cursor {
        animation: none;
        opacity: 1;
    }
}

/* =============================================
     GSAPアニメーション・カスタムカーソル
     ============================================= */
body.gsap-enabled .reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.hero-title {
    white-space: normal;
    letter-spacing: .015em;
}

.typewriter-line {
    display: block;
    min-height: .92em;
    letter-spacing: .015em;
}

.typewriter-line+.typewriter-line {
    font-family: inherit;
    font-style: normal;
    font-weight: inherit;
    letter-spacing: .015em;
    padding-left: 3.42em;
}

.portrait-wrap {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: end;
}

.portrait-wrap img {
    will-change: transform;
}

.work-image img,
.section-heading h2,
.skill-row,
.contact-layout h2 {
    will-change: transform;
}

.cursor-ring,
.cursor-dot {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

.cursor-ring {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(21, 21, 21, .65);
    border-radius: 50%;
    place-items: center;
    transition: width .28s ease, height .28s ease, background .28s ease, border-color .28s ease;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text);
    z-index: 10000;
}

.cursor-label {
    opacity: 0;
    color: #fff;
    font-size: 9px;
    letter-spacing: .14em;
    line-height: 1;
    transition: opacity .2s ease;
}

.cursor-ring.is-active {
    width: 64px;
    height: 64px;
    border-color: rgba(21, 21, 21, .35);
}

.cursor-ring.is-view {
    width: 76px;
    height: 76px;
    background: var(--text);
    border-color: var(--text);
}

.cursor-ring.is-view .cursor-label {
    opacity: 1;
}

.cursor-ring.is-view+.cursor-dot {
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {

    body.cursor-ready,
    body.cursor-ready a,
    body.cursor-ready button,
    body.cursor-ready .work-card {
        cursor: none;
    }

    body.cursor-ready .cursor-ring {
        display: grid;
    }

    body.cursor-ready .cursor-dot {
        display: block;
    }
}

body.gsap-enabled .modal-panel {
    animation: none;
}

@media (max-width: 900px) {
    .typewriter-line {
        min-height: .95em;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.gsap-enabled .reveal {
        opacity: 1;
        transform: none;
    }

    .portrait-wrap img {
        transform: none !important;
    }
}

@media (max-width: 620px) {
    .typewriter-line+.typewriter-line {
        padding-left: 2em;
    }

    body.sp-motion-active .portrait-wrap {
        max-width: 250px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .contact-layout h2 {
        max-width: 80%;
        margin: 0 auto;
        font-size: clamp(48px, 10vw, 60px);
    }
}


/* =============================================
     マガジン表示：ページめくりの基本設定
     ============================================= */
@media (min-width: 901px) {
    html.magazine-mode {
        scroll-snap-type: y proximity;
    }

    main {
        perspective: 1800px;
        perspective-origin: 50% 50%;
    }

    .mag-page,
    .magazine-longform {
        position: relative;
        isolation: isolate;
    }

    .mag-page {
        min-height: 100svh;
        scroll-snap-align: start;
        transform-style: preserve-3d;
        transform-origin: 0% 50%;
        backface-visibility: hidden;
        background: rgba(255, 255, 255, .82);
        border: 1px solid rgba(21, 21, 21, .07);
        box-shadow: 0 32px 90px rgba(21, 21, 21, .055);
        padding-left: clamp(34px, 4vw, 64px);
        padding-right: clamp(34px, 4vw, 64px);
    }

    .mag-page:not(.mag-page--hero) {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mag-page::before,
    .magazine-longform::before {
        content: attr(data-page);
        position: absolute;
        top: 24px;
        right: 28px;
        z-index: 3;
        font-size: 10px;
        letter-spacing: .18em;
        color: rgba(21, 21, 21, .42);
        pointer-events: none;
    }

    .mag-page::after {
        content: "";
        position: absolute;
        top: 0;
        right: -1px;
        width: 12px;
        height: 100%;
        background: linear-gradient(to left, rgba(21, 21, 21, .06), rgba(21, 21, 21, 0));
        opacity: 0;
        transition: opacity .25s ease;
        pointer-events: none;
    }

    body.magazine-turning .mag-page::after {
        opacity: 1;
    }

    .magazine-longform {
        scroll-snap-align: start;
        background: var(--bg);
        z-index: 2;
    }

    .hero.mag-page {
        min-height: calc(100svh - 92px);
    }

    .about.mag-page,
    .skills.mag-page,
    .contact.mag-page {
        padding-top: clamp(94px, 8vw, 130px);
        padding-bottom: clamp(94px, 8vw, 130px);
    }

    .contact.mag-page {
        min-height: 100svh;
    }

    .page-turn-active {
        will-change: transform, opacity, filter;
    }
}

@media (max-width: 900px) {

    .mag-page,
    .magazine-longform {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        filter: none !important;
    }

    /* PCでマガジン表示を初期化したあとにSP幅へ切り替えた場合、
       GSAPが子要素へ付けたinlineのopacity / visibility / transformを打ち消す */
    html.magazine-mode .mag-page>*,
    html.magazine-mode .magazine-longform>* {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}


/* =============================================
     マガジン表示：PCの固定ページめくり
     ホイール操作では通常スクロールせず、ページめくりのみを行う
     ============================================= */
@media (min-width: 901px) {

    html.magazine-mode,
    html.magazine-mode body {
        width: 100%;
        height: 100%;
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    html.magazine-mode {
        scroll-snap-type: none !important;
        scroll-behavior: auto;
    }

    html.magazine-mode body {
        background: #f4f7fb;
    }

    html.magazine-mode .site-header {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 80;
        background: var(--bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    html.magazine-mode main {
        position: fixed;
        inset: 0;
        height: 100svh;
        overflow: hidden;
        perspective: 1800px;
        perspective-origin: 50% 0%;
    }

    html.magazine-mode .mag-page,
    html.magazine-mode .magazine-longform {
        position: absolute !important;
        inset: 0;
        width: var(--page);
        height: 100svh;
        min-height: 100svh !important;
        max-height: 100svh;
        margin: 0 auto;
        padding-top: 116px !important;
        padding-bottom: 28px !important;
        overflow: hidden;
        background: var(--bg);
        border: 1px solid rgba(21, 21, 21, .07);
        box-shadow: 0 26px 90px rgba(21, 21, 21, .09);
        transform-style: preserve-3d;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform-origin: 50% 0%;
        opacity: 0;
        visibility: hidden;
    }

    html.magazine-mode .mag-page--hero {
        display: flex;
        min-height: 100svh !important;
        padding-top: 138px !important;
        padding-bottom: 36px !important;
    }

    html.magazine-mode .mag-page:not(.mag-page--hero),
    html.magazine-mode .magazine-longform {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    html.magazine-mode .mag-page::before,
    html.magazine-mode .magazine-longform::before {
        top: 104px;
        right: 12px;
    }

    html.magazine-mode .mag-page::after,
    html.magazine-mode .magazine-longform::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 42%;
        pointer-events: none;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .13), rgba(0, 0, 0, 0));
        opacity: 0;
        z-index: 20;
    }

    html.magazine-mode body.magazine-turning .mag-page::after,
    html.magazine-mode body.magazine-turning .magazine-longform::after {
        opacity: .44;
    }

    html.magazine-mode .section-heading {
        margin-bottom: clamp(24px, 3.2vh, 42px);
    }

    html.magazine-mode .section-heading h2 {
        font-size: clamp(38px, 4.8vw, 72px);
    }

    html.magazine-mode .about-layout {
        grid-template-columns: minmax(260px, .8fr) 1.15fr;
        gap: clamp(42px, 6vw, 100px);
        align-items: center;
    }

    html.magazine-mode .about-copy {
        padding-top: 0;
    }

    html.magazine-mode .about-copy .about-intro {
        font-size: clamp(24px, 2.6vw, 38px);
    }

    html.magazine-mode .about-copy p {
        margin-top: 10px;
        margin-bottom: 30px;
        font-weight: 600;
    }

    html.magazine-mode .about-meta {
        margin-top: 24px;
    }

    html.magazine-mode .about-meta div {
        padding: 10px 0;
    }

    /* Worksを1枚の見開きとして扱い、サムネイルを4列×3段で均等配置する */
    html.magazine-mode .works {
        justify-content: flex-start;
        padding-top: 108px !important;
    }

    html.magazine-mode .works .section-heading {
        grid-template-columns: .45fr 1.2fr .85fr;
        gap: 28px;
        margin-bottom: 14px;
    }

    html.magazine-mode .works .section-heading h2 {
        font-size: clamp(30px, 3.7vw, 54px);
        line-height: .96;
    }

    html.magazine-mode .works .section-lead {
        font-size: 11px;
        line-height: 1.55;
    }

    html.magazine-mode .filter-row {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    html.magazine-mode .filter-button {
        padding: 5px 12px;
        font-size: 10px;
    }

    html.magazine-mode .works-grid {
        width: 100%;
        max-width: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: repeat(3, minmax(0, 1fr));
        gap: clamp(12px, 1.6vh, 18px) 16px;
        flex: 1 1 auto;
        min-height: 0;
    }

    html.magazine-mode .work-card {
        min-height: 0;
    }

    html.magazine-mode .work-image,
    html.magazine-mode .work-card[data-category="poster"] .work-image,
    html.magazine-mode .work-card[data-category="logo"] .work-image {
        aspect-ratio: 16 / 8.8;
        max-height: 16.4vh;
    }

    html.magazine-mode .work-info {
        padding-top: 6px;
        gap: 1px 8px;
    }

    html.magazine-mode .work-info h3 {
        font-size: 12px;
        line-height: 1.2;
    }

    html.magazine-mode .work-info span,
    html.magazine-mode .work-info p {
        font-size: 8px;
    }

    html.magazine-mode .skills .section-heading {
        margin-bottom: 30px;
    }

    html.magazine-mode .skill-row {
        padding: clamp(16px, 2.3vh, 25px) 0;
    }

    html.magazine-mode .site-footer {
        display: none;
    }

    html.magazine-mode .page-turn-hint {
        position: fixed;
        right: max(24px, calc((100vw - 1360px) / 2));
        bottom: 22px;
        z-index: 90;
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 9px;
        letter-spacing: .16em;
        text-transform: uppercase;
        color: rgba(21, 21, 21, .54);
        pointer-events: none;
    }

    html.magazine-mode .page-turn-hint::before {
        content: "";
        width: 28px;
        height: 1px;
        background: currentColor;
    }
}

/* =============================================
     マガジン表示：レイアウト調整
     ・PCでは見開きを全幅表示
     ・FVの2行目を深めにインデント
     ・Worksのみ縦スクロールを許可
     ・左下を支点にページをめくる
     ============================================= */
@media (min-width: 901px) {
    html.magazine-mode .site-header {
        width: 100%;
        max-width: none;
        padding-left: clamp(32px, 4vw, 72px);
        padding-right: clamp(32px, 4vw, 72px);
    }

    html.magazine-mode .mag-page,
    html.magazine-mode .magazine-longform {
        left: 0;
        right: 0;
        width: 100vw;
        max-width: none;
        margin: 0;
        padding-left: clamp(32px, 4vw, 72px) !important;
        padding-right: clamp(32px, 4vw, 72px) !important;
        transform-origin: 0% 100%;
    }

    html.magazine-mode main {
        perspective: 2200px;
        perspective-origin: 0% 100%;
    }

    html.magazine-mode .typewriter-line+.typewriter-line {
        padding-left: 1.22em;
    }

    /* Worksは固定マガジン内の長い1枚として扱い、余白と縦スクロールを確保する */
    html.magazine-mode .works {
        display: block;
        height: 100svh;
        max-height: 100svh;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        padding-top: 132px !important;
        padding-bottom: 110px !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(21, 21, 21, .22) transparent;
    }

    html.magazine-mode .works::-webkit-scrollbar {
        width: 7px;
    }

    html.magazine-mode .works::-webkit-scrollbar-track {
        background: transparent;
    }

    html.magazine-mode .works::-webkit-scrollbar-thumb {
        background: rgba(21, 21, 21, .20);
        border-radius: 999px;
    }

    html.magazine-mode .works .section-heading {
        grid-template-columns: .65fr 1.5fr 1fr;
        gap: 48px;
        margin-bottom: 30px;
    }

    html.magazine-mode .works .section-heading h2 {
        font-size: clamp(42px, 5.7vw, 84px);
        line-height: .98;
    }

    html.magazine-mode .works .section-lead {
        font-size: 14px;
        line-height: 1.7;
    }

    html.magazine-mode .filter-row {
        margin-bottom: 26px;
        padding-bottom: 28px;
    }

    html.magazine-mode .filter-button {
        padding: 8px 15px;
        font-size: 12px;
    }

    html.magazine-mode .works-grid {
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: none;
        gap: 52px 24px;
        min-height: auto;
    }

    html.magazine-mode .work-card {
        min-height: auto;
    }

    html.magazine-mode .work-image,
    html.magazine-mode .work-card[data-category="poster"] .work-image,
    html.magazine-mode .work-card[data-category="logo"] .work-image {
        aspect-ratio: 4 / 3;
        max-height: none;
    }

    html.magazine-mode .work-info {
        padding-top: 13px;
        gap: 3px 14px;
    }

    html.magazine-mode .work-info h3 {
        font-size: 17px;
        line-height: 1.4;
    }

    html.magazine-mode .work-info span,
    html.magazine-mode .work-info p {
        font-size: 10px;
    }

    html.magazine-mode .mag-page::after,
    html.magazine-mode .magazine-longform::after {
        left: auto;
        right: 0;
        top: 0;
        width: 11%;
        height: 100%;
        background: linear-gradient(to left, rgba(0, 0, 0, .15), rgba(0, 0, 0, 0));
    }

    html.magazine-mode .page-turn-hint {
        right: 28px;
    }
}

/* =============================================
     マガジン表示：コンテンツ幅と描画負荷の最終調整
     ・見開きは全画面、内容は中央1200pxに制限
     ・Worksのサムネイルサイズを調整
     ・ページめくり時の描画負荷を軽減
     ============================================= */
@media (min-width: 901px) {
    html.magazine-mode .site-header {
        width: 100%;
        max-width: none;
        padding-left: clamp(24px, 4vw, 64px);
        padding-right: clamp(24px, 4vw, 64px);
    }

    /* 見開き自体は画面幅いっぱいにし、内部コンテンツのみ最大幅を制限する */
    html.magazine-mode .mag-page,
    html.magazine-mode .magazine-longform {
        padding-left: 0 !important;
        padding-right: 0 !important;
        will-change: transform;
        transform-style: preserve-3d;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    html.magazine-mode .hero>.hero-kicker,
    html.magazine-mode .hero>.hero-title,
    html.magazine-mode .hero>.hero-footer,
    html.magazine-mode .about>.section-heading,
    html.magazine-mode .about>.about-layout,
    html.magazine-mode .works>.section-heading,
    html.magazine-mode .works>.filter-row,
    html.magazine-mode .skills>.section-heading,
    html.magazine-mode .skills>.skill-list,
    html.magazine-mode .contact>.contact-eyebrow,
    html.magazine-mode .contact>.contact-layout {
        width: min(calc(100vw - 64px), 1200px);
        margin-left: auto;
        margin-right: auto;
    }

    /* 1200px幅の構成内でも、タイトル2行目のインデントをしっかり残す */
    html.magazine-mode .typewriter-line+.typewriter-line {
        padding-left: 3.4em;
    }

    /* Worksは縦スクロール可能な長い1枚のまま、ギャラリー幅だけ少し狭くする */
    html.magazine-mode .works-grid {
        width: min(calc(100vw - 64px), 1000px);
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 46px 24px;
    }

    html.magazine-mode .work-image,
    html.magazine-mode .work-card[data-category="poster"] .work-image,
    html.magazine-mode .work-card[data-category="logo"] .work-image {
        aspect-ratio: 4 / 3;
    }

    /* ページめくり中の不要な描画処理を抑える */
    html.magazine-mode body.magazine-turning .mag-page,
    html.magazine-mode body.magazine-turning .magazine-longform {
        pointer-events: none;
    }

    html.magazine-mode .page-turn-hint {
        right: max(28px, calc((100vw - 1200px) / 2));
    }
}

/* =============================================
     スマートフォン：ヘッダー幅の調整
     ============================================= */
@media (max-width: 900px) {
    .site-header {
        width: 100%;
        max-width: none;
        padding-left: 16px;
        padding-right: 16px;
    }

    .global-nav {
        left: 0;
        right: 0;
        width: 100%;
    }
}

@media (max-width: 620px) {
    .site-header {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* =============================================
     ヘッダー：PC / SP切り替え時の状態をリセット
     ・PC用のtranslateX(-50%)がSP側へ残らないようにする
     ・どちらの表示でもヘッダーを全幅に保つ
     ============================================= */
@media (min-width: 901px) {
    html.magazine-mode .site-header {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        transform: none !important;
    }
}

@media (max-width: 900px) {
    .site-header {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        transform: none !important;
        background: var(--bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 1000;
    }

    .global-nav {
        top: 76px;
        z-index: 999;
    }
}

/* =============================================
     スマートフォン：ナビゲーションアニメーション
     ・メニュー開閉を滑らかにする
     ・GSAPが無効でもコンテンツを常に読める状態にする
     ============================================= */
@media (max-width: 900px) {
    .global-nav {
        display: flex;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transform-origin: top center;
        transition:
            opacity .28s ease,
            transform .38s cubic-bezier(.2, .8, .2, 1),
            visibility 0s linear .38s;
    }

    .global-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition-delay: 0s;
    }

    .global-nav a {
        opacity: 0;
        transform: translateY(-7px);
        transition:
            opacity .28s ease,
            transform .36s cubic-bezier(.2, .8, .2, 1);
    }

    .global-nav.is-open a {
        opacity: 1;
        transform: translateY(0);
    }

    .global-nav.is-open a:nth-child(1) {
        transition-delay: .04s;
    }

    .global-nav.is-open a:nth-child(2) {
        transition-delay: .08s;
    }

    .global-nav.is-open a:nth-child(3) {
        transition-delay: .12s;
    }

    .global-nav.is-open a:nth-child(4) {
        transition-delay: .16s;
    }

    body.sp-motion-active .work-image {
        width: 100%;
        max-width: none;
        margin: 0;
        transform: translateZ(0);
    }

    body.sp-motion-active .portrait-wrap {
        transform: translateZ(0);
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) and (max-width: 900px) {

    .global-nav,
    .global-nav a {
        transition: none !important;
        transform: none !important;
    }
}

/* =============================================
   CONTACT FORM 7
   ============================================= */

.contact-form-wrap {
    width: 100%;
    margin-top: 22px;
}

.contact-form-wrap .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-form-wrap .wpcf7-form>p {
    margin: 0;
}

.contact-form-wrap label {
    display: block;
    margin: 0;
}

.contact-form-wrap .form-label {
    display: block;
    margin-bottom: 5px;

    color: var(--muted);
    font-size: 9px;
    line-height: 1;
    letter-spacing: .18em;
}

.contact-form-wrap input[type="text"],
.contact-form-wrap input[type="email"],
.contact-form-wrap textarea {
    display: block;

    width: 100%;
    margin: 0;
    padding: 5px 0 8px;

    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;

    outline: none;
    background: transparent;

    color: var(--text);
    font: inherit;

    appearance: none;
}

.contact-form-wrap input[type="text"],
.contact-form-wrap input[type="email"] {
    height: 32px;
}

.contact-form-wrap textarea {
    height: 76px;
    min-height: 76px;
    resize: none;
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus {
    border-bottom-color: var(--text);
}


/* SEND */

.contact-form-wrap .form-submit {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    margin-top: 4px;
}

.contact-form-wrap input[type="submit"] {
    padding: 4px 0;

    border: 0;
    border-bottom: 1px solid currentColor;

    background: transparent;
    color: var(--text);

    font: inherit;
    font-size: 10px;
    letter-spacing: .16em;

    cursor: pointer;
}

.contact-form-wrap input[type="submit"]:hover {
    opacity: .5;
}


/* CF7 default styles reset */

.contact-form-wrap .wpcf7-spinner {
    position: absolute;
}

.contact-form-wrap .wpcf7-not-valid-tip {
    margin-top: 3px;
    font-size: 10px;
}

.contact-form-wrap .wpcf7-response-output {
    margin: 8px 0 0 !important;
    padding: 6px 0 !important;

    border: 0 !important;
    border-top: 1px solid var(--line) !important;

    font-size: 10px;
}


/* SP */

@media (max-width: 620px) {

    .contact-form-wrap {
        margin-top: 24px;
    }

    .contact-form-wrap .wpcf7-form {
        gap: 18px;
    }

    .contact-form-wrap textarea {
        height: 90px;
        min-height: 90px;
    }
}

/* =============================================
   CONTACT: responsive layout fix
   - 中間幅でタイトルとフォームが潰れないよう調整
   - SPでは固定pxインデントを相対値に変更
   - フォームの横幅と余白を安定化
   ============================================= */

@media (max-width: 1200px) and (min-width: 901px) {
    .contact-layout {
        grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
        gap: clamp(36px, 5vw, 64px);
        align-items: center;
    }

    .contact-layout h2 {
        font-size: clamp(64px, 7.2vw, 104px);
        line-height: .88;
        overflow-wrap: normal;
        word-break: keep-all;
    }

    .contact-layout #contact-title .s-line {
        padding-left: .55em;
    }

    .contact-layout #contact-title .t-line {
        padding-left: 1.1em;
    }

    .contact-copy {
        min-width: 0;
        width: 100%;
    }

    .contact-copy p {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .contact {
        padding-top: 96px;
        padding-bottom: 96px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 54px;
        align-items: start;
    }

    .contact-layout h2 {
        width: min(100%, 720px);
        max-width: none;
        margin: 0;
        font-size: clamp(62px, 11vw, 92px);
        line-height: .9;
        overflow-wrap: normal;
        word-break: keep-all;
    }

    .contact-layout #contact-title .s-line {
        padding-left: .7em;
    }

    .contact-layout #contact-title .t-line {
        padding-left: 1.4em;
    }

    .contact-copy {
        width: min(100%, 720px);
        padding-bottom: 0;
    }

    .contact-copy p {
        max-width: 620px;
        margin-top: 0;
        margin-bottom: 34px;
    }

    .contact-form-wrap {
        width: 100%;
        margin-top: 0;
    }
}

@media (max-width: 620px) {
    .contact {
        padding-top: 76px;
        padding-bottom: 76px;
    }

    .contact-layout {
        gap: 42px;
    }

    .contact-layout h2 {
        width: 100%;
        max-width: none;
        margin: 0;
        font-size: clamp(50px, 15vw, 72px);
        line-height: .9;
        letter-spacing: -.065em;
    }

    .contact-layout #contact-title .s-line {
        padding-left: .55em;
    }

    .contact-layout #contact-title .t-line {
        padding-left: 1.1em;
    }

    .contact-copy {
        width: 100%;
    }

    .contact-copy p {
        margin: 0 0 30px;
        font-size: 14px;
        line-height: 1.85;
    }

    .contact-form-wrap {
        margin-top: 0;
    }

    .contact-form-wrap .wpcf7-form {
        gap: 22px;
    }

    .contact-form-wrap .form-label {
        margin-bottom: 9px;
        font-size: 10px;
    }

    .contact-form-wrap input[type="text"],
    .contact-form-wrap input[type="email"] {
        height: 42px;
        padding: 7px 0 10px;
    }

    .contact-form-wrap textarea {
        height: 112px;
        min-height: 112px;
        padding: 7px 0 10px;
    }

    .contact-form-wrap .form-submit {
        margin-top: 8px;
    }
}

/* =============================================
   CONTACT: responsive layout refinement v2
   - desktop/tablet content stays centered
   - form width is capped so it never dominates
   - title aligns from the top instead of dropping downward
   ============================================= */

/* PC / small desktop: magazine page */
@media (min-width: 901px) {

    html.magazine-mode .contact>.contact-eyebrow,
    html.magazine-mode .contact>.contact-layout {
        width: min(calc(100vw - 96px), 1200px);
        margin-left: auto;
        margin-right: auto;
    }

    html.magazine-mode .contact>.contact-layout {
        grid-template-columns: minmax(0, 1.08fr) minmax(360px, .72fr);
        gap: clamp(56px, 6vw, 104px);
        align-items: start;
    }

    html.magazine-mode .contact-layout h2 {
        align-self: start;
        margin-top: 0;
        max-width: 650px;
        font-size: clamp(72px, 7vw, 118px);
        line-height: .84;
        overflow-wrap: normal;
        word-break: keep-all;
    }

    html.magazine-mode .contact-copy {
        width: min(100%, 460px);
        justify-self: end;
        align-self: start;
        padding-bottom: 0;
    }

    html.magazine-mode .contact-copy>p {
        max-width: 420px;
        margin: 0 0 24px;
    }

    html.magazine-mode .contact-form-wrap {
        width: 100%;
        max-width: 460px;
        margin-top: 0;
    }

    html.magazine-mode .contact-form-wrap .wpcf7-form {
        gap: 12px;
    }

    html.magazine-mode .contact-form-wrap input[type="text"],
    html.magazine-mode .contact-form-wrap input[type="email"] {
        height: 30px;
    }

    html.magazine-mode .contact-form-wrap textarea {
        height: 72px;
        min-height: 72px;
    }
}

/* 901-1200px: keep the two-column composition compact */
@media (min-width: 901px) and (max-width: 1200px) {

    html.magazine-mode .contact>.contact-eyebrow,
    html.magazine-mode .contact>.contact-layout {
        width: min(calc(100vw - 80px), 1040px);
    }

    html.magazine-mode .contact>.contact-layout {
        grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr);
        gap: clamp(44px, 5vw, 72px);
    }

    html.magazine-mode .contact-layout h2 {
        max-width: 520px;
        font-size: clamp(66px, 7.2vw, 92px);
    }

    html.magazine-mode .contact-copy,
    html.magazine-mode .contact-form-wrap {
        width: min(100%, 400px);
        max-width: 400px;
    }
}

/* Tablet: one column, but keep everything centered and reasonably narrow */
@media (max-width: 900px) {

    .contact>.contact-eyebrow,
    .contact>.contact-layout {
        width: min(calc(100% - 48px), 720px);
        margin-left: auto;
        margin-right: auto;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        align-items: start;
    }

    .contact-layout h2 {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        font-size: clamp(58px, 10vw, 84px);
        line-height: .88;
    }

    .contact-copy {
        width: min(100%, 560px);
        margin: 0 auto;
        padding-bottom: 0;
    }

    .contact-copy>p {
        max-width: 520px;
        margin: 0 0 26px;
    }

    .contact-form-wrap {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .contact-form-wrap .wpcf7-form {
        gap: 14px;
    }

    .contact-form-wrap input[type="text"],
    .contact-form-wrap input[type="email"] {
        height: 34px;
    }

    .contact-form-wrap textarea {
        height: 82px;
        min-height: 82px;
    }
}

/* Smartphone */
@media (max-width: 620px) {

    .contact>.contact-eyebrow,
    .contact>.contact-layout {
        width: min(calc(100% - 32px), 520px);
    }

    .contact-layout {
        gap: 38px;
    }

    .contact-layout h2 {
        width: fit-content;
        margin: 0 auto;
        font-size: clamp(48px, 14vw, 68px);
        line-height: .9;
    }

    .contact-layout #contact-title .s-line {
        padding-left: .48em;
    }

    .contact-layout #contact-title .t-line {
        padding-left: .96em;
    }

    .contact-copy,
    .contact-form-wrap {
        width: 100%;
        max-width: none;
    }

    .contact-copy>p {
        margin-bottom: 24px;
        font-size: 14px;
        line-height: 1.8;
    }

    .contact-form-wrap .wpcf7-form {
        gap: 16px;
    }

    .contact-form-wrap textarea {
        height: 88px;
        min-height: 88px;
    }
}

/* =============================================
   CONTACT: title balance refinement v3
   - PC幅では左タイトルを一段大きく
   - フォーム位置は維持したままタイトルのみ少し下げる
   ============================================= */
@media (min-width: 1201px) {
    html.magazine-mode .contact-layout h2 {
        max-width: 720px;
        margin-top: clamp(42px, 5.5vh, 68px);
        font-size: clamp(88px, 8vw, 136px);
        line-height: .84;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    html.magazine-mode .contact-layout h2 {
        max-width: 600px;
        margin-top: clamp(34px, 4.8vh, 56px);
        font-size: clamp(76px, 8vw, 108px);
        line-height: .85;
    }
}

/* =============================================
   404 PAGE
   ============================================= */

.error-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px 5vw 60px;
    background: var(--bg);
    color: var(--text);
}

.error-page__inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.error-page__eyebrow {
    margin: 0 0 42px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .16em;
}

.error-page__content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 80px;
    align-items: end;
}

.error-page__number {
    font-family: var(--serif);
    font-size: clamp(160px, 28vw, 440px);
    font-weight: 500;
    line-height: .72;
    letter-spacing: -.07em;
}

.error-page__copy {
    padding-bottom: 18px;
}

.error-page__copy h1 {
    margin: 0 0 24px;
    font-family: var(--serif);
    font-size: clamp(42px, 5vw, 80px);
    font-weight: 500;
    line-height: .95;
    letter-spacing: -.04em;
}

.error-page__copy p {
    margin: 0 0 42px;
    max-width: 460px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.error-page__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid currentColor;

    color: var(--text);
    font-size: 12px;
    letter-spacing: .1em;
    text-decoration: none;

    transition:
        opacity .25s ease,
        gap .25s ease;
}

.error-page__link:hover {
    gap: 18px;
    opacity: .6;
}


/* SP */

@media (max-width: 900px) {

    .error-page {
        padding: 110px 24px 48px;
    }

    .error-page__eyebrow {
        margin-bottom: 55px;
    }

    .error-page__content {
        display: block;
    }

    .error-page__number {
        margin-bottom: 56px;
        font-size: clamp(130px, 43vw, 240px);
    }

    .error-page__copy h1 {
        font-size: clamp(44px, 12vw, 72px);
    }

    .error-page__copy p {
        margin-bottom: 36px;
        font-size: 13px;
    }
}

/* =============================================
   WORK MODAL: Swiper
   ============================================= */
.modal-media {
    position: relative;
}

.modal-swiper {
    width: 100%;
    height: 100%;
    min-width: 0;
}

.modal-swiper .swiper-wrapper,
.modal-swiper .swiper-slide {
    height: 100%;
}

.modal-swiper .swiper-slide {
    display: grid;
    place-items: center;
}

.modal-swiper .swiper-slide img {
    width: 100%;
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
}

.modal-swiper-button {
    width: 42px;
    height: 42px;
    margin-top: -21px;
    border: 1px solid rgba(21, 21, 21, .14);
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    color: var(--text);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-swiper-button::after {
    font-size: 14px;
    font-weight: 600;
}

.modal-swiper .swiper-pagination {
    bottom: 14px !important;
}

.modal-swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(21, 21, 21, .38);
    opacity: 1;
}

.modal-swiper .swiper-pagination-bullet-active {
    background: var(--text);
}

.modal-swiper.is-single .modal-swiper-button,
.modal-swiper.is-single .swiper-pagination {
    display: none !important;
}

@media (max-width: 900px) {
    .modal-swiper .swiper-slide img {
        max-height: 48vh;
    }

    .modal-swiper-button {
        display: none;
    }

    .modal-swiper .swiper-pagination {
        bottom: 8px !important;
    }
}