.case-details {
    margin: 20px 0 0;
    border-top: 1px solid var(--line, #d9e1ed);
    padding-top: 14px;
}
.case-details summary {
    cursor: pointer;
    color: var(--ink, #07111f);
    font-size: 14px;
    font-weight: 750;
}
.case-facts { display: grid; gap: 12px; margin: 16px 0 0; }
.case-facts div { display: grid; gap: 3px; }
.case-facts dt { color: var(--ink, #07111f); font-size: 12px; font-weight: 750; }
.case-facts dd { margin: 0; color: var(--muted, #536176); font-size: 14px; line-height: 1.7; }
.case-consultation {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    padding: 10px 14px;
    border: 1px solid #ccd8ec;
    border-radius: 10px;
    background: #eef4ff;
    color: #17479b;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}
.case-consultation:hover { background: #dfeaff; }
.case-consultation[hidden] { display: none !important; }
.case-photo { margin: 0 0 20px; }
.case-photo img { display: block; width: 100%; height: auto; border-radius: 12px; }
.case-photo figcaption { margin-top: 9px; color: var(--muted, #536176); font-size: 12px; line-height: 1.65; }
.review-current-link { display: inline-block; margin-top: 12px; color: #17479b; font-weight: 750; }
.case-details summary:focus-visible,
.case-consultation:focus-visible,
.review-current-link:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }

/* Real work photo cards: landing sections, the gallery and related cases */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.work-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-grid-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line, #dce4ef); border-radius: 18px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.work-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(7, 17, 31, .12); }
.work-card[hidden] { display: none; }
.work-card-link { display: flex; flex: 1; flex-direction: column; color: inherit; }
.work-card-link:focus-visible { outline: 3px solid #0759db; outline-offset: -3px; }
.work-card-media { position: relative; overflow: hidden; background: #e9eef5; }
.work-card-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.work-card:hover .work-card-media img { transform: scale(1.03); }
.work-card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.work-card-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.work-card-chips span { padding: 3px 8px; border-radius: 999px; background: #eef3fb; color: #31435e; font-size: 11px; font-weight: 800; }
.work-card-chips span:first-child { background: #07111f; color: #fff; }
.work-card-title { margin: 10px 0 6px; font-size: 17px; line-height: 1.4; letter-spacing: -.03em; word-break: keep-all; }
.work-card-meta { margin: auto 0 0; padding-top: 6px; color: var(--muted, #5e6c80); font-size: 12px; }
.work-card .case-details { margin: 0 18px; padding: 12px 0 0; }
.work-card .case-consultation { width: auto; margin: 12px 18px 18px; }
.work-more { margin: 22px 0 0; text-align: center; }
.work-more .btn { min-height: 48px; font-size: 15px; }
.work-strip { margin-top: 30px; }
.work-strip-title { margin: 0 0 14px; font-size: 20px; letter-spacing: -.03em; }
.evidence-panel .case-photo { margin: 0 0 18px; }

/* Case pages, the gallery and the company page share one light page header */
.case-hero { padding: 26px 0 58px; background: linear-gradient(180deg, #f3f6fb 0%, #fff 100%); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 26px; padding: 0; color: var(--muted, #5e6c80); font-size: 13px; list-style: none; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: #9aa8bb; }
.breadcrumb a { color: #263247; text-decoration: underline; text-decoration-color: #c5d0df; text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: var(--muted, #5e6c80); }
.case-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 46px; align-items: center; }
.case-kicker { margin: 0 0 12px; color: var(--blue, #2f6df6); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.case-hero h1 { margin: 0; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.18; letter-spacing: -.055em; text-wrap: balance; word-break: keep-all; }
.case-lead { max-width: 640px; margin: 18px 0 0; color: #3e4c61; font-size: 17px; line-height: 1.75; word-break: keep-all; }
.case-source-line { margin: 14px 0 0; color: var(--muted, #5e6c80); font-size: 13px; }
.case-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.case-hero .case-consultation { max-width: 320px; }
.case-figure { margin: 0; }
.case-figure img { width: 100%; height: auto; border-radius: 18px; background: #e9eef5; }
.case-figure figcaption { margin-top: 9px; color: var(--muted, #5e6c80); font-size: 13px; line-height: 1.6; }
.case-figure-main img { box-shadow: 0 24px 60px rgba(7, 17, 31, .16); }
.case-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 34px; align-items: start; }
.case-photos { display: grid; gap: 26px; }
.case-facts-panel { position: sticky; top: 96px; padding: 26px; border: 1px solid var(--line, #dce4ef); border-radius: 20px; background: #fff; }
.case-facts-panel h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.case-facts-panel .btn { width: 100%; min-height: 48px; margin-top: 20px; font-size: 15px; }
.case-note { margin: 14px 0 0; color: var(--muted, #5e6c80); font-size: 12px; line-height: 1.7; }
.case-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.case-stats li { padding: 18px 20px; border: 1px solid var(--line, #dce4ef); border-radius: 16px; background: #fff; }
.case-stats strong { display: block; color: var(--ink, #07111f); font-size: 24px; line-height: 1.2; letter-spacing: -.04em; }
.case-stats span { display: block; margin-top: 5px; color: var(--muted, #5e6c80); font-size: 13px; line-height: 1.5; }
/* The gallery and company pages open like the landing pages: 형's photo behind the copy. */
.page-about .hero { background-image: url('/assets/images/hero-accident-owner.webp'); }
.page-cases .hero { background-image: url('/assets/images/hero-wrap-owner.webp'); }
.hero-compact { min-height: 540px; }
.hero-compact .hero-inner { padding: 56px 0 64px; }
.hero .breadcrumb ol { color: #aebdd2; }
.hero .breadcrumb a { color: #e6eefa; text-decoration-color: rgba(230, 238, 250, .45); }
.hero .breadcrumb li + li::before { color: #8193ab; }
.stats-band { padding: 28px 0; background: var(--surface-muted, #f3f6fb); }
.stats-band .case-stats { margin: 0; }
.page-cases .case-gallery-section { padding-top: 34px; }

/* Case pages put 형's face next to the phone and SMS buttons. */
.owner-cta { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: center; margin-top: 24px; padding: 18px; border: 1px solid var(--line, #dce4ef); border-radius: 20px; background: #fff; box-shadow: 0 16px 40px rgba(7, 17, 31, .08); }
.owner-cta-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #e9eef5; }
.owner-cta-copy strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.owner-cta-copy p { margin: 3px 0 0; color: var(--muted, #5e6c80); font-size: 14px; line-height: 1.55; word-break: keep-all; }
.owner-cta .hero-actions { grid-column: 1 / -1; margin-top: 12px; }
.owner-cta .cta-alt { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted, #5e6c80); }

/* Gallery filters are hidden until cases.js runs, so every case stays visible without JavaScript */
.case-filters { display: grid; gap: 10px; margin: 0 0 22px; }
.case-filters[hidden], .case-filter-empty[hidden] { display: none; }
.case-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.case-filter-label { min-width: 34px; color: var(--muted, #5e6c80); font-size: 13px; font-weight: 800; }
.case-filter button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line, #dce4ef); border-radius: 999px; background: #fff; color: #263247; font-size: 14px; font-weight: 800; cursor: pointer; }
.case-filter button span { color: var(--muted, #5e6c80); font-weight: 700; }
.case-filter button[aria-pressed="true"] { border-color: var(--ink, #07111f); background: var(--ink, #07111f); color: #fff; }
.case-filter button[aria-pressed="true"] span { color: #b9c7db; }
.case-filter-status { margin: 2px 0 0; color: var(--muted, #5e6c80); font-size: 13px; }
.case-filter-empty { margin: 20px 0; color: var(--muted, #5e6c80); }
.case-hubs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }
.case-hubs a { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line, #dce4ef); border-radius: 999px; background: #fff; color: #263247; font-size: 14px; font-weight: 800; white-space: nowrap; }
.case-hubs a span { color: var(--muted, #5e6c80); font-weight: 700; }
.case-hubs a[aria-current] { border-color: var(--ink, #07111f); background: var(--ink, #07111f); color: #fff; }
.case-hubs a[aria-current] span { color: #b9c7db; }
.work-grid + .case-hubs { margin-top: 18px; }
.page-cases .source-notice { margin-top: 22px; }

.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line, #dce4ef); border-radius: 18px; background: #fff; }
.about-card h3 { margin: 16px 0 8px; font-size: 21px; letter-spacing: -.03em; }
.about-card p { margin: 0 0 18px; color: var(--muted, #5e6c80); font-size: 15px; line-height: 1.7; word-break: keep-all; }
.about-card .source-link { margin-top: auto; }

@media (max-width: 1020px) {
    .work-grid-four, .work-grid-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .case-hero-grid, .case-body-grid { grid-template-columns: 1fr; gap: 26px; }
    .case-facts-panel { position: static; }
    .case-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .page-cases .hero {
        padding-top: clamp(220px, 58vw, 260px);
        background-position: 75% top;
        background-size: auto clamp(220px, 58vw, 260px);
    }
    .page-cases .hero-lead { display: none; }
    .hero-compact { min-height: 0; }
    .hero-compact .hero-inner { padding: 0 0 26px; }
    .hero .breadcrumb ol { margin-bottom: 12px; font-size: 12px; }
    .stats-band { padding: 20px 0; }
    .owner-cta { grid-template-columns: 52px minmax(0, 1fr); padding: 14px; margin-top: 18px; }
    .owner-cta-photo { width: 52px; height: 52px; }
    .owner-cta-copy p { font-size: 13px; }
    .page-cases .case-gallery-section { padding-top: 22px; }
    .page-case .case-body { padding-top: 8px; }
    .work-grid, .work-grid-four { display: flex; gap: 12px; margin-right: -15px; padding: 0 15px 8px 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .work-grid::-webkit-scrollbar { display: none; }
    .work-grid > .work-card { flex: 0 0 min(80vw, 310px); scroll-snap-align: start; }
    .work-grid-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-right: 0; padding: 0; overflow: visible; }
    .work-grid-gallery > .work-card { flex: initial; }
    .work-grid-gallery .work-card-body { padding: 10px 11px 12px; }
    .work-grid-gallery .work-card-chips span:not(:first-child) { display: none; }
    .work-grid-gallery .work-card-title { margin: 7px 0 4px; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .work-grid-gallery .work-card-meta { font-size: 11px; }
    .case-hero { padding: 16px 0 36px; }
    .breadcrumb ol { margin-bottom: 16px; }
    .case-hero-grid .case-figure-main { order: -1; }
    .case-hero h1 { font-size: clamp(26px, 7.4vw, 32px); }
    .case-lead { font-size: 15px; }
    .case-hero .hero-actions { display: grid; grid-template-columns: 1fr; }
    .case-hero .hero-actions .btn { width: 100%; }
    .case-hero .case-consultation { max-width: none; }
    .case-body-grid .case-facts-panel { order: -1; padding: 20px; }
    .case-stats { gap: 8px; margin-top: 22px; }
    .case-stats li { padding: 14px; }
    .case-stats strong { font-size: 20px; }
    .case-filter { flex-wrap: nowrap; margin-right: -15px; padding-right: 15px; overflow-x: auto; scrollbar-width: none; }
    .case-filter::-webkit-scrollbar { display: none; }
    .case-filter button { flex: 0 0 auto; }
    .case-hubs { flex-wrap: nowrap; margin-right: -15px; padding-right: 15px; overflow-x: auto; scrollbar-width: none; }
    .case-hubs::-webkit-scrollbar { display: none; }
    .case-hubs a { flex: 0 0 auto; }
    .about-card { padding: 20px; }
}

/* The 320px layout keeps a 12px page gutter, so swipe rows bleed by 12px, not 15px. */
@media (max-width: 360px) {
    .work-grid, .work-grid-four, .case-filter, .case-hubs { margin-right: -12px; padding-right: 12px; }
    .work-grid-gallery { margin-right: 0; padding-right: 0; }
}
