body {
    font-family: var(--webcase-body-font-family);
    min-width: 380px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Body */
.body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1000px;
    min-width: 380px;
}

/* Case Title */
.case-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding: 40px 10px;
    overflow: hidden;
}

.title1 {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.title-text {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.title-text h1 {
    font-size: 36px;
    line-height: normal;
    letter-spacing: var(--webcase-title-letter-spacing);
    white-space: nowrap;
    font-weight: normal;
}

.title-underline {
    width: 300px;
    height: 6px;
    position: relative;
    background: none;
}

.title-underline img {
    display: block;
    width: 100%;
    height: 100%;
}

.detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    gap: 0;
}

.detail-image {
    width: 360px;
    height: 320px;
    max-width: 360px;
    min-width: 360px;
    position: relative;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-text {
    display: flex;
    flex-direction: column;
    gap: 29px;
    align-items: center;
    justify-content: center;
    max-width: 360px;
    padding: 40px 0;
    overflow: hidden;
}

.detail-description {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 360px;
    width: 100%;
}

.detail-copy {
    font-family: var(--webcase-detail-desc-font);
    font-size: 14px;
    line-height: 24px;
    max-width: 360px;
    width: 100%;
}

.check-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 80px;
    min-width: 360px;
    width: 100%;
    padding: 15px 10px;
    overflow: hidden;
    cursor: pointer;
}

.check-button-text {
    font-size: 28px;
    line-height: 1;
    letter-spacing: var(--webcase-check-button-letter-spacing);
    white-space: nowrap;
}

.check-icon {
    width: 30px;
    height: 30px;
}

.check-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Case Description */
.case-desc {
    display: flex;
    flex-direction: column;
    gap: 80px;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    min-width: 380px;
    width: 100%;
    padding: 40px 0;
    overflow: visible;
}

.case-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1000px;
    min-width: 380px;
    width: 100%;
    /*overflow: hidden;*/
    overflow: visible;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    min-width: 360px;
    width: 100%;
    overflow: hidden;
    gap: 0;
}

.section-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    max-width: 360px;
    min-width: 220px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    max-width: 360px;
    min-width: 220px;
    padding: 0 20px;
    gap: 10px;
}

.section-title-wrapper h2 {
    font-size: 40px;
    line-height: 1;
    max-width: 360px;
    min-width: 200px;
    white-space: nowrap;
    font-weight: normal;
}

.section-underline {
    width: 220px;
    height: 100%;
    max-width: 360px;
    min-width: 220px;
    padding: 0 0;
    position: relative;
}

.section-underline img {
    width: 180px;
    height: 3px;
}

.section-description {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: 760px;
    min-width: 360px;
    padding: 16px 0px 30px 16px;
}

.section-copy {
    font-family: var(--webcase-section-desc-font);
    font-size: 14px;
    line-height: 24px;
    max-width: 745px;
    width: 100%;
}

.case-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1000px;
    min-width: 380px;
    width: 100%;
    padding: 0 10px;
    padding-top: 50px;
    overflow: visible;
}

.case-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    width: 300px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.case-item:hover,
.case-item:focus-visible {
    transform: translateY(-5px);
    z-index: 1;
}

/* Tooltip */
.case-item[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(230, 171, 187, 0.85);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--webcase-tooltip-font);
    font-size: 13px;
    line-height: 1.4;
    width: max-content;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}

.case-item[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-width: 0;
    border-top-color: rgba(230, 171, 187, 0.85);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.case-item[data-tooltip]:hover::before,
.case-item[data-tooltip]:hover::after,
.case-item[data-tooltip]:focus-visible::before,
.case-item[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

.case-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 300px;
    height: 188px;
    box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.25);
    position: relative;
}

.case-image-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-name {
    background-color: rgba(230, 174, 187, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 10px;
    width: 300px;
    overflow: hidden;
    position: relative;
}

.case-name p {
    font-family: var(--webcase-case-name-font);
    font-size: 12px;
    line-height: 24px;
    white-space: nowrap;
    color: #ffffff;
}

/* More Button */
.more-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    max-width: 1000px;
    min-width: 380px;
    width: 100%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.more-button img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.more-button p {
    flex: 1 1 0;
    font-size: 20px;
    line-height: 29px;
    text-align: center;
    max-width: 1000px;
    min-width: 380px;
    position: relative;
    z-index: 1;
}

/* Footer */
.footer-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 80px;
    max-width: 1280px;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
}

.footer-content p {
    font-family: 'Rounded Mplus 1c', sans-serif;
    font-size: 10px;
    line-height: 1;
    text-align: center;
    color: #ffffff;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .web-menu {
        gap: 15px;
        font-size: 16px;
        padding: 10px;
    }

    .title-text h1 {
        font-size: 28px;
        letter-spacing: var(--webcase-title-letter-spacing-tablet);
    }

    .title-underline {
        width: 240px;
    }

    .detail {
        flex-direction: column;
    }

    .detail-image {
        width: 100%;
        max-width: 100%;
        min-width: 320px;
    }

    .detail-text {
        max-width: 100%;
        width: 100%;
        padding: 20px 10px;
    }

    .section-title-wrapper h2 {
        font-size: 32px;
    }

    .case-line {
        gap: 80px;
    }
}

@media (max-width: 480px) {
    .case-name p {
        font-size: 13px;
    }

    .left-frame,
    .right-frame {
        min-width: 100%;
        max-width: 100%;
    }

    .center-frame {
        min-width: 100%;
    }

    .web-menu {
        gap: 10px;
        font-size: 14px;
    }

    .title-text h1 {
        font-size: var(--webcase-mobile-title-font-size);
        letter-spacing: var(--webcase-title-letter-spacing-mobile);
    }

    .title-underline {
        width: 200px;
    }

    .detail-image {
        min-width: 100%;
        height: 280px;
    }

    .check-button {
        min-width: 100%;
    }

    .check-button-text {
        font-size: 24px;
    }

    .section-title-wrapper h2 {
        font-size: 28px;
    }

    .case-item {
        width: 100%;
        max-width: 300px;
    }

    .case-image-wrapper,
    .case-name {
        width: 100%;
    }
}

/* Unified portfolio: keep the Korean gallery styles unchanged. */
.case-desc--unified .case-line {
    padding-top: 0;
}

.case-desc--unified .case-item {
    color: inherit;
    text-decoration: none;
}

.case-desc--unified .case-item:focus-visible {
    outline: 3px solid #96566a;
    outline-offset: 5px;
}

.case-desc--unified .case-image-wrapper {
    background: #faf0f3;
}

.case-desc--unified .case-image-wrapper img {
    object-position: top center;
}

.case-desc--unified .case-name p {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.case-desc--unified .case-site-address {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    color: #704352;
    font-family: sans-serif;
    font-size: 16px;
    overflow-wrap: anywhere;
    text-align: center;
}

/* 분류와 갤러리는 좁은 화면에 맞추되 카드 최대 너비는 유지한다. */
@media (max-width: 768px) {
    body,
    .body,
    .detail-image,
    .check-button,
    .case-desc,
    .case-section,
    .section-header,
    .section-heading,
    .section-title-wrapper,
    .section-title-wrapper h2,
    .section-description,
    .case-line,
    .more-button,
    .more-button p {
        min-width: 0;
    }

    .title-text,
    .section-heading,
    .section-title-wrapper,
    .case-item {
        max-width: 100%;
    }

    .case-title,
    .title1,
    .title-text,
    .detail,
    .detail-text,
    .check-button,
    .case-desc,
    .section-header,
    .case-name,
    .more-button {
        overflow: visible;
    }

    .title-text h1,
    .check-button-text,
    .section-title-wrapper h2,
    .case-name p {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .check-icon {
        flex-shrink: 0;
    }

    .section-description {
        flex-basis: 360px;
        max-width: 100%;
        padding-right: 16px;
    }

    .case-item {
        width: 100%;
        max-width: 300px;
    }

    .case-image-wrapper,
    .case-name {
        width: 100%;
    }

    .case-image-wrapper {
        height: auto;
        aspect-ratio: 300 / 188;
    }
}

.title-text h1,
.section-title-wrapper h2 {
    text-wrap: balance;
}

.detail-copy,
.section-copy {
    text-wrap: pretty;
}
