.case-webtoon {
    --case-ink: #181b21;
    --case-muted: #475569;
    --case-accent: #17469f;
    --case-line: #e4e7ec;
    --case-focus: #dbeafe;
    --case-panel-ink: #12264b;
    --case-panel-blue: #1849bb;
    --case-panel-line: #cfddf4;
    --case-panel-control: #6684b6;
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--header-height, 70px) + 16px) 16px 56px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(56px, env(safe-area-inset-bottom, 0px));
    color: var(--case-ink);
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.case-webtoon__reader {
    max-width: 760px;
    margin: 0 auto;
}

.case-webtoon.case-webtoon--embedded {
    padding: 0;
}

.case-webtoon > .case-webtoon__news-nav {
    margin-bottom: 16px;
}

.article-magazine-news-page .article-header--case-webtoon {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: 0;
}

.case-webtoon__news-nav .news-editorial-nav + .news-editorial-nav {
    margin-top: 8px;
}

.case-webtoon__claim-cta {
    margin: 12px 0 22px;
}

.case-webtoon [id] {
    scroll-margin-top: calc(var(--header-height, 70px) + 12px);
}

.case-webtoon a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--case-accent);
    font-weight: 600;
    text-decoration: none;
}

.case-webtoon a:hover {
    background-color: #f3f6fb;
}

.case-webtoon a:focus-visible,
.case-webtoon summary:focus-visible {
    outline: none;
    background-color: var(--case-focus);
    color: #153a7b;
}

.case-webtoon__back {
    font-size: 14px;
}

.case-webtoon__intro {
    margin: 15px 0 20px;
}

.case-webtoon__topic {
    margin: 0 0 8px;
    color: var(--case-accent);
    font-size: 14px;
    font-weight: 650;
}

.case-webtoon__intro h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 720;
    line-height: 1.25;
    letter-spacing: -0.035em;
    word-break: keep-all;
}

.case-webtoon__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin: 12px 0 0;
    color: var(--case-muted);
    font-size: 14px;
}

.case-webtoon__contents {
    margin-bottom: 22px;
    border-block: 1px solid var(--case-line);
}

.case-webtoon__contents ul,
.case-webtoon__sources,
.case-webtoon__signature {
    margin: 0;
    padding: 0;
    list-style: none;
}

.case-webtoon__contents ul,
.case-webtoon__sources,
.case-webtoon__end {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.case-webtoon__contents a,
.case-webtoon__sources a,
.case-webtoon__end a {
    padding: 0 10px;
    font-size: 14px;
}

.case-webtoon__contents a {
    box-sizing: border-box;
    min-width: 44px;
    justify-content: center;
}

.case-webtoon__comic {
    margin: 0;
}

.case-webtoon__comic-art {
    position: relative;
}

.case-webtoon__comic img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #f5f7fa;
}

.case-webtoon__comic-caption {
    position: absolute;
    box-sizing: border-box;
    width: fit-content;
    max-width: 57%;
    margin: 0;
    padding: clamp(7px, 1.35vw, 12px) clamp(9px, 1.5vw, 14px);
    border: 1px solid #2c2a28;
    border-radius: 4px;
    background: #fffef9;
    color: #1c1917;
    font-size: clamp(14px, 1.5vw, 19px);
    font-weight: 680;
    line-height: 1.36;
    letter-spacing: -0.015em;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.case-webtoon__comic-caption--question {
    top: 1.25%;
    left: 3%;
}

.case-webtoon__comic-caption--answer {
    right: 3%;
    bottom: 2.7%;
    background-color: #fff3ca;
}

.case-webtoon__comic-transcript {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.case-webtoon__comic figcaption,
.case-webtoon__source {
    margin: 8px 0 0;
    color: var(--case-muted);
    font-size: 14px;
}

.case-webtoon__section {
    margin-top: 38px;
    padding-top: 22px;
    border-top: 1px solid var(--case-line);
    font-size: 17px;
}

.case-webtoon__section h2 {
    margin: 0 0 10px;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 680;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.case-webtoon__section p + p {
    margin-top: 0.85em;
}

.case-webtoon .case-expert [hidden] {
    display: none;
}

.case-webtoon__section.case-expert {
    padding-top: 0;
    border-top: 0;
}

.case-expert__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(144px, 24vw, 190px);
    align-items: center;
    gap: 16px;
    padding: 19px clamp(20px, 4vw, 35px);
    border: 1px solid var(--case-panel-line);
    border-radius: 16px;
    background: linear-gradient(112deg, #f4f8ff 10%, #e2eeff 100%);
    color: var(--case-panel-ink);
}

.case-expert__intro h2,
.case-webtoon__document h2 {
    margin: 0;
    color: var(--case-panel-ink);
    font-weight: 730;
    word-break: keep-all;
}

.case-expert:focus,
.case-expert h2:focus,
.case-webtoon__document:focus {
    outline: none;
}

.case-expert__description {
    max-width: 27em;
    margin: 8px 0 17px;
    color: #344968;
    font-size: 16px;
    line-height: 1.55;
    word-break: keep-all;
}

.case-expert__illustration {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.case-webtoon .case-expert__action {
    box-sizing: border-box;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 7px 13px;
    border: 1px solid var(--case-panel-blue);
    border-radius: 9px;
    background: var(--case-panel-blue);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    word-break: keep-all;
}

.case-webtoon .case-expert__action:hover {
    background: #10378f;
}

.case-webtoon .case-expert__action:focus-visible {
    outline: none;
    background: #fff;
    color: #163d99;
}

.case-expert__status {
    margin: 0;
    color: var(--case-panel-ink);
    font-size: 14px;
}

.case-expert__gate .case-expert__status:not(:empty) {
    margin: 10px 0 0;
}

.case-expert__retry {
    appearance: none;
    min-height: 44px;
    margin-top: 5px;
    padding: 6px 12px;
    border: 1px solid var(--case-panel-control);
    border-radius: 8px;
    background: #fff;
    color: var(--case-panel-blue);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.case-expert__retry:focus-visible {
    outline: none;
    background: var(--case-panel-ink);
    color: #fff;
}

.case-expert--reading .case-expert__intro {
    grid-template-columns: minmax(0, 1fr) 66px;
    padding-block: 7px;
}

.case-expert__chapter {
    display: grid;
    grid-template-columns: minmax(8em, 0.32fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px 22px;
    padding: 20px 4px;
}

.case-expert__chapter + .case-expert__chapter {
    border-top: 1px solid var(--case-panel-line);
}

.case-expert__chapter:last-child {
    padding-bottom: 0;
}

.case-webtoon__section .case-expert__chapter h3 {
    margin: 0;
    color: var(--case-panel-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    word-break: keep-all;
}

.case-expert__body p {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
    word-break: keep-all;
}

.case-webtoon__answer {
    color: var(--case-accent);
    font-size: 1.12em;
    font-weight: 700;
}

.case-webtoon__shares {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 16px 0 0;
    padding: 13px 16px;
    background: #f5f7fa;
}

.case-webtoon__shares dt,
.case-webtoon__case-record dt {
    color: var(--case-muted);
    font-size: 14px;
    font-weight: 600;
}

.case-webtoon__shares dd,
.case-webtoon__case-record dd {
    margin: 2px 0 0;
}

.case-webtoon__shares dd {
    font-size: 1.1em;
    font-weight: 700;
}

.case-webtoon__sources {
    margin: 13px 0 14px;
}

.case-webtoon__sources a {
    padding-inline: 13px;
    border: 1px solid #687181;
    border-radius: 6px;
}

.case-webtoon__section.case-webtoon__document {
    margin-top: 24px;
    padding: clamp(16px, 3vw, 24px);
    border: 1px solid var(--case-panel-line);
    border-radius: 14px;
    background: #fbfdff;
}

.case-webtoon__document-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 15px;
}

.case-webtoon__document-head .case-webtoon__source {
    margin: 5px 0 0;
    line-height: 1.55;
    word-break: keep-all;
}

.case-webtoon__document-head .case-webtoon__sources {
    margin: 0;
}

.case-webtoon__document-head .case-webtoon__sources a {
    box-sizing: border-box;
    padding-inline: 9px;
    border-color: transparent;
    border-radius: 7px;
    color: #22467f;
    font-size: 14px;
    line-height: 1.35;
}

.case-webtoon__document-head .case-webtoon__sources a:focus-visible {
    background: var(--case-panel-ink);
    color: #fff;
}

.case-webtoon__document details {
    margin-top: 13px;
    border: 1px solid var(--case-panel-control);
    border-radius: 9px;
    background: #fff;
}

.case-webtoon__document summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 2px 12px 2px 15px;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--case-panel-blue);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    list-style: none;
}

.case-webtoon__document summary:hover {
    background: #dfebfd;
}

.case-webtoon__document summary:focus-visible {
    background: var(--case-panel-ink);
    color: #fff;
}

.case-webtoon__document summary::-webkit-details-marker {
    display: none;
}

.case-webtoon__document-indicator {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #d9e7fc;
    color: var(--case-panel-blue);
}

.case-webtoon__document-indicator::before {
    content: '';
    box-sizing: border-box;
    width: 8px;
    height: 8px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.case-webtoon__document details[open] summary {
    border-radius: 8px 8px 0 0;
}

.case-webtoon__document details[open] .case-webtoon__document-indicator::before {
    margin-top: 3px;
    transform: rotate(225deg);
}

.case-webtoon details[open] .case-webtoon__when-closed,
.case-webtoon details:not([open]) .case-webtoon__when-open {
    display: none;
}

.case-webtoon__judgment {
    padding: 18px clamp(14px, 4vw, 30px) 25px;
    border-top: 1px solid var(--case-line);
    font-size: 16px;
    line-height: 1.8;
}

.case-webtoon__judgment-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.case-webtoon__judgment-heading p,
.case-webtoon__judgment-heading h3 {
    margin: 0;
}

.case-webtoon__judgment h4 {
    margin: 24px 0 8px;
    font-size: 19px;
}

.case-webtoon__judgment h5 {
    margin: 17px 0 6px;
    font-size: inherit;
}

.case-webtoon__case-record {
    margin: 14px 0 0;
}

.case-webtoon__case-record div {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) minmax(0, 5fr);
    gap: 8px;
    padding-block: 7px;
    border-bottom: 1px solid var(--case-line);
}

.case-webtoon__signature {
    margin-top: 15px;
}

.case-webtoon__end {
    justify-content: space-between;
    margin-top: 22px;
}

@media (max-width: 580px) {
    .case-expert__intro {
        grid-template-columns: minmax(0, 1fr) clamp(78px, 25vw, 114px);
        gap: 9px;
        padding: 17px 14px 17px 16px;
    }

    .case-expert__description {
        margin-bottom: 12px;
        font-size: 15px;
    }

    .case-expert__action span {
        display: none;
    }

    .case-expert--reading .case-expert__intro {
        grid-template-columns: minmax(0, 1fr) 55px;
    }

    .case-expert__chapter {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        padding-block: 16px;
    }

    .case-webtoon__document-head {
        gap: 4px 12px;
    }

    .case-webtoon__document details {
        margin-top: 7px;
    }
}

@media (max-width: 480px) {
    .case-webtoon__intro {
        margin-top: 8px;
    }

    .case-webtoon__contents ul {
        gap: 4px;
    }

    .case-webtoon__contents a {
        padding-inline: 8px;
    }

    .case-webtoon__section {
        margin-top: 30px;
        font-size: 16px;
    }
}

@media (forced-colors: active) {
    .case-webtoon a:focus-visible,
    .case-webtoon .case-expert__action:focus-visible,
    .case-webtoon .case-expert__retry:focus-visible,
    .case-webtoon__document summary:focus-visible,
    .case-webtoon__document-head .case-webtoon__sources a:focus-visible {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
    }
}
