/* public/css/works.css
   実績一覧（/works/）と実績詳細（/works/<slug>.html）の見た目。魔法陣＝システム構成図の世界（段階4、2026-10-12）。
   色・書体は style.css の :root（--sg-*）。構成図（.ad）の線と文字・陣（.qs / .sgi）の基本も style.css。
   HTML と CSS の既定は「描き終わった最終状態」。動き（絞り込みの並び替え・図を描く）は public/js/works.js。 */

/* ==========================================================================
   土台
   ========================================================================== */
.wk-main {
    position: relative;
    color: var(--sg-text);
    /* 和文は文節で折り返す（語の途中で改行しない。auto-phrase 非対応のブラウザは従来どおり） */
    word-break: auto-phrase;
    line-break: strict;
    overflow-x: clip;
    background:
        radial-gradient(1100px 620px at 82% 80px, rgba(var(--sg-silver-rgb), .05), transparent 70%),
        var(--sg-ground);
}

.wk-page {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--sg-gut);
}

.wk-sec {
    margin-top: clamp(64px, 7vw, 104px);
}

.wk-h2 {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
    margin-bottom: clamp(22px, 2.4vw, 32px);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .08em;
    color: var(--sg-white);
}

/* 見出しの右へ伸びる銀の細線（トップの見出しと同じ形） */
.wk-h2::after {
    content: "";
    flex: 1;
    min-width: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--sg-silver-rgb), .5), rgba(var(--sg-silver-rgb), .14));
}

.wk-h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .08em;
    color: var(--sg-white);
}

.wk-arr {
    flex: none;
    width: 18px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .3s var(--sg-ease-out);
}

.wk-text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--sg-brass);
    transition: color .25s var(--sg-ease-out);
}

.wk-text-link:hover {
    color: var(--sg-white);
}

.wk-text-link:hover .wk-arr {
    transform: translateX(4px);
}

/* 枠の角の「＋」目盛り */
.wk-x {
    position: absolute;
    width: 11px;
    height: 11px;
    pointer-events: none;
    z-index: 2;
    opacity: .7;
    background:
        linear-gradient(var(--sg-silver), var(--sg-silver)) center / 1px 100% no-repeat,
        linear-gradient(var(--sg-silver), var(--sg-silver)) center / 100% 1px no-repeat;
}

.wk-x-tl { left: 6px; top: 6px; }
.wk-x-tr { right: 6px; top: 6px; }
.wk-x-bl { left: 6px; bottom: 6px; }
.wk-x-br { right: 6px; bottom: 6px; }

/* 種類の色の短い線＋種類名 */
.wk-kind {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .06em;
    color: var(--kc, var(--sg-brass));
}

.wk-kind::before {
    content: "";
    flex: none;
    width: 22px;
    height: 1px;
    background: currentColor;
}

/* ==========================================================================
   実績一覧: 見出し
   ========================================================================== */
.wk-head {
    position: relative;
    padding-top: clamp(24px, 2.8vw, 40px);
}

/* 右上の陣の弧（装飾） */
.wk-orn {
    position: absolute;
    right: calc(-1 * var(--sg-gut) - 24px);
    top: 0;
    width: clamp(200px, 30vw, 440px);
    height: auto;
    fill: none;
    stroke: var(--sg-silver);
    pointer-events: none;
}

.wk-orn .wk-orn-l { stroke-opacity: .42; stroke-width: 1.2; }
.wk-orn .wk-orn-t { stroke: var(--sg-brass); stroke-opacity: .7; stroke-width: 1; }
.wk-orn .wk-orn-f { stroke-opacity: .16; stroke-width: 1; stroke-dasharray: 3 5; }
.wk-orn .wk-orn-c { fill: var(--sg-silver); stroke: none; opacity: .7; }

.wk-titlebar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 20px;
}

.wk-h1 {
    font-size: clamp(38px, 4.2vw, 60px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .06em;
    color: var(--sg-white);
}

.wk-total {
    font-size: 17px;
    letter-spacing: .06em;
    color: var(--sg-mute);
}

.wk-total .sg-num {
    margin-right: .25em;
    font-family: var(--sg-en);
    font-size: 19px;
    color: var(--sg-white);
}

.wk-intro {
    position: relative;
    display: grid;
    gap: 32px;
    margin-top: clamp(16px, 1.8vw, 24px);
}

.wk-statement {
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .08em;
    color: var(--sg-white);
}

.wk-lead {
    margin-top: 10px;
    max-width: 54em;
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--sg-text);
}

.wk-notice {
    margin-top: 10px;
    max-width: 62em;
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--sg-mute);
}

/* ご相談の入口から探す（トップの相談内容の目次と同じ形） */
.wk-entries-h {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--sg-white);
}

.wk-entries-h::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--sg-silver-rgb), .45), rgba(var(--sg-silver-rgb), .1));
}

.wk-entry-list {
    list-style: none;
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.wk-entry {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 12px;
    padding: 5px 14px;
    border: 1px solid rgba(var(--sg-silver-rgb), .22);
    background: linear-gradient(90deg, rgba(var(--sg-silver-rgb), .025), rgba(var(--sg-silver-rgb), 0) 60%);
    transition: border-color .3s var(--sg-ease-out), background-color .3s var(--sg-ease-out);
}

.wk-entry:hover {
    border-color: rgba(var(--sg-silver-rgb), .72);
    background-color: rgba(var(--sg-silver-rgb), .035);
}

.wk-entry .sgi {
    width: 28px;
    height: 28px;
}

.wk-entry:hover .sgi-ring {
    stroke-opacity: .9;
}

.wk-entry-label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .06em;
    color: var(--sg-white);
}

.wk-entry-n {
    font-size: 12.5px;
    letter-spacing: .06em;
    color: var(--sg-mute);
    white-space: nowrap;
}

.wk-entry-n .sg-num {
    margin-right: .2em;
    font-family: var(--sg-en);
    font-size: 12px;
    color: var(--sg-text);
}

.wk-entry-go {
    display: flex;
    color: rgba(var(--sg-silver-rgb), .6);
    transition: color .3s var(--sg-ease-out);
}

/* ページ内の下へ進むので矢印は下向き */
.wk-entry-go .wk-arr {
    transform: rotate(90deg);
}

.wk-entry:hover .wk-entry-go {
    color: var(--sg-white);
}

.wk-entry:hover .wk-entry-go .wk-arr {
    transform: rotate(90deg) translateX(3px);
}

@media (min-width: 1024px) {
    .wk-intro {
        grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
        gap: clamp(36px, 3.6vw, 56px);
        align-items: start;
    }

    .wk-entries {
        /* 右上の陣の弧の下に入るので、見出しの高さぶんだけ下げない */
        margin-top: 4px;
    }
}

/* ==========================================================================
   実績一覧: 絞り込み
   ========================================================================== */
.wk-catalog {
    margin-top: clamp(28px, 3vw, 40px);
}

.wk-filters {
    display: grid;
    gap: 12px;
    padding-top: clamp(18px, 2vw, 24px);
    border-top: 1px solid var(--sg-line);
}

.wk-filters[hidden],
.wk-more-panel[hidden] {
    display: none;
}

/* JS が動く環境では、絞り込みの行の場所を最初から取っておき（直後のインライン script）、works.js が
   準備できたら見せる。読み込み後に一覧が下へずれる（CLS）のを防ぐ */
.wk-filters.is-pending {
    visibility: hidden;
}

.wk-more-panel {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

/* 領域・技術の開閉 */
.wk-more-filters {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 4px 16px;
    border: 1px solid rgba(var(--sg-silver-rgb), .42);
    border-radius: 999px;
    font-size: 13.5px;
    letter-spacing: .06em;
    color: var(--sg-white);
    cursor: pointer;
    transition: border-color .25s var(--sg-ease-out);
}

.wk-more-filters:hover {
    border-color: var(--sg-silver);
}

.wk-more-n {
    margin-left: -4px;
    color: var(--sg-brass);
}

.wk-more-n:empty {
    display: none;
}

.wk-more-filters[aria-expanded="true"] .wk-sum-ic::after {
    transform: rotate(0deg);
    opacity: 0;
}

.wk-frow {
    display: grid;
    grid-template-columns: 3.4em minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.wk-flabel {
    padding-top: 7px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .2em;
    color: var(--sg-brass);
}

.wk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wk-chip {
    --kc: var(--sg-silver);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 6px 15px 6px 13px;
    border: 1px solid rgba(var(--sg-silver-rgb), .42);
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: .04em;
    color: var(--sg-text);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .3s var(--sg-ease-out), border-color .3s var(--sg-ease-out), color .3s var(--sg-ease-out);
}

.wk-chip:hover {
    border-color: var(--sg-silver);
    color: var(--sg-white);
}

.wk-chip-dot {
    position: relative;
    flex: none;
    width: 11px;
    height: 11px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    transition: border-color .3s var(--sg-ease-out), background-color .3s var(--sg-ease-out);
}

.wk-chip-n {
    font-size: 12px;
    color: var(--sg-mute);
}

.wk-chip[aria-pressed="true"] {
    background: var(--sg-silver);
    border-color: var(--sg-silver);
    color: var(--sg-ground);
    font-weight: 700;
}

.wk-chip[aria-pressed="true"] .wk-chip-n {
    color: var(--sg-on-silver-mute);
}

.wk-chip[aria-pressed="true"] .wk-chip-dot::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: currentColor;
}

/* 種類のチップは種類の色 */
.wk-chip[data-k="biz"] { --kc: var(--sg-kind-biz); }
.wk-chip[data-k="member"] { --kc: var(--sg-kind-member); }
.wk-chip[data-k="infra"] { --kc: var(--sg-kind-infra); }
.wk-chip[data-k="web"] { --kc: var(--sg-kind-web); }
.wk-chip[data-k="product"] { --kc: var(--sg-kind-product); }

.wk-chip[data-k] {
    border-color: color-mix(in srgb, var(--kc) 50%, transparent);
}

.wk-chip[data-k] .wk-chip-dot {
    border-color: var(--kc);
    background: color-mix(in srgb, var(--kc) 28%, transparent);
}

.wk-chip[data-k]:hover {
    border-color: var(--kc);
}

.wk-chip[data-k][aria-pressed="true"] {
    background: color-mix(in srgb, var(--kc) 16%, var(--sg-ground));
    border-color: var(--kc);
    color: var(--kc);
}

.wk-chip[data-k][aria-pressed="true"] .wk-chip-dot {
    background: var(--kc);
}

.wk-chip[data-k][aria-pressed="true"] .wk-chip-dot::after {
    background: var(--sg-ground);
}

.wk-chip[data-k][aria-pressed="true"] .wk-chip-n {
    color: inherit;
    opacity: .8;
}

.wk-result-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    padding-left: calc(3.4em + 18px);
}

.wk-result {
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--sg-mute);
}

.wk-result .sg-num {
    margin-right: .2em;
    font-family: var(--sg-en);
    font-size: 14px;
    color: var(--sg-white);
}

.wk-reset {
    position: relative;
    padding: 4px 0;
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--sg-brass);
    text-decoration: underline;
    text-decoration-color: rgba(var(--sg-brass-rgb), .5);
    text-underline-offset: .3em;
    cursor: pointer;
    transition: color .25s var(--sg-ease-out);
}

.wk-reset:hover {
    color: var(--sg-white);
}

/* 押せる範囲を 44px 前後に広げる（見た目の大きさは変えない） */
.wk-reset::before {
    content: "";
    position: absolute;
    inset: -10px -8px;
}

.wk-reset[hidden] {
    display: none;
}

/* 狭い画面: 段ごとに横へ送る（行が増えすぎないように）。右端は薄くして続きがあることを示す */
@media (max-width: 767px) {
    .wk-frow {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .wk-flabel {
        padding-top: 0;
        font-size: 14px;
    }

    .wk-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 calc(-1 * var(--sg-gut));
        padding: 4px var(--sg-gut) 8px;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    }

    .wk-chips::-webkit-scrollbar {
        display: none;
    }

    .wk-chip {
        flex: none;
        min-height: 40px;
        font-size: 13.5px;
    }

    .wk-result-bar {
        padding-left: 0;
    }
}

/* ==========================================================================
   実績一覧: 相談の入口ごとの格子
   ========================================================================== */
.wk-groups {
    margin-top: clamp(26px, 2.6vw, 36px);
}

.wk-group + .wk-group {
    margin-top: clamp(52px, 5.6vw, 80px);
}

.wk-group[hidden],
.wk-card[hidden],
.wk-empty[hidden] {
    display: none;
}

.wk-ghead {
    margin-bottom: 14px;
    scroll-margin-top: 88px;
}

.wk-gh {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .08em;
    color: var(--sg-white);
}

.wk-gh::after {
    content: "";
    flex: 1;
    min-width: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--sg-silver-rgb), .45), rgba(var(--sg-silver-rgb), .1));
}

.wk-gdesc {
    margin-top: 2px;
    max-width: 52em;
    font-size: 14px;
    line-height: 1.85;
    color: var(--sg-mute);
}

.wk-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

@media (min-width: 640px) {
    .wk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .wk-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
    }
}

.wk-empty {
    padding: clamp(48px, 6vw, 88px) 0;
    text-align: center;
    font-size: 15px;
    color: var(--sg-mute);
}

.wk-empty .wk-btn-line {
    margin-top: 22px;
}

/* ==========================================================================
   実績のカード（一覧・似た実績で共通）
   ========================================================================== */
.wk-card {
    --kc: var(--sg-silver);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px 14px 18px;
    border: 1px solid rgba(var(--sg-silver-rgb), .28);
    background: linear-gradient(180deg, rgba(var(--sg-silver-rgb), .03), rgba(var(--sg-silver-rgb), 0) 70%);
    isolation: isolate;
    overflow: hidden;
    transition: border-color .35s var(--sg-ease-out), background-color .35s var(--sg-ease-out);
}

/* 上辺の種類の色 */
.wk-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--kc);
    opacity: .85;
}

.wk-card:hover,
.wk-card:focus-within {
    border-color: rgba(var(--sg-silver-rgb), .85);
    background-color: rgba(var(--sg-silver-rgb), .03);
}

.wk-fig {
    position: relative;
}

/* 図の光の滲み（種類の色） */
.wk-glow {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--kc) 20%, transparent) 0%, color-mix(in srgb, var(--kc) 7%, transparent) 42%, transparent 68%);
    opacity: .85;
    transition: opacity .35s var(--sg-ease-out);
}

.wk-card:hover .wk-glow {
    opacity: 1;
}

.wk-card .ad .ad-mark {
    transition: filter .35s var(--sg-ease-out);
}

.wk-card:hover .ad .ad-mark {
    filter: drop-shadow(0 0 3px rgba(230, 0, 18, calc(var(--sg-glow) * 1.5)));
}

.wk-cap {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: .06em;
    text-align: center;
    color: var(--sg-mute);
}

.wk-title {
    margin-top: 14px;
    padding: 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .04em;
    color: var(--sg-white);
}

/* カード全体をクリック対象にする（中にほかのリンクは置かない） */
.wk-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
}

.wk-link:focus-visible {
    outline: none;
}

.wk-link:focus-visible::after {
    outline: 2px solid var(--sg-white);
    outline-offset: -2px;
}

.wk-card .wk-kind {
    margin-top: 8px;
    padding: 0 6px;
}

.wk-tags,
.wk-techs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wk-tags {
    margin-top: 14px;
    padding: 0 6px;
}

.wk-tags li,
.wk-techs li {
    padding: 2px 12px;
    border: 1px solid rgba(var(--sg-silver-rgb), .42);
    border-radius: 999px;
    font-family: var(--sg-en);
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: .03em;
    color: var(--sg-text);
    white-space: nowrap;
}

.wk-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-end;
    margin-top: auto;
    padding: 16px 6px 0;
    font-size: 12.5px;
    letter-spacing: .08em;
    color: var(--sg-brass);
    transition: color .3s var(--sg-ease-out);
}

.wk-card:hover .wk-more {
    color: var(--sg-white);
}

.wk-card:hover .wk-more .wk-arr {
    transform: translateX(4px);
}

@media (max-width: 639px) {
    .wk-card {
        padding: 14px 8px 16px;
    }
}

/* ==========================================================================
   実績詳細
   ========================================================================== */
.wk-d-head {
    padding-top: clamp(24px, 3vw, 40px);
}

.wk-crumbs ol {
    list-style: none;
    line-height: 1.9;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--sg-mute);
}

.wk-crumbs li {
    display: inline;
}

.wk-crumbs li + li::before {
    content: "/";
    margin: 0 10px;
    color: rgba(var(--sg-silver-rgb), .35);
}

.wk-crumbs a {
    color: var(--sg-mute);
    text-decoration: underline;
    text-decoration-color: rgba(var(--sg-mute-rgb), .35);
    text-underline-offset: .28em;
    transition: color .25s var(--sg-ease-out);
}

.wk-crumbs a:hover {
    color: var(--sg-white);
}

.wk-crumbs [aria-current] {
    color: var(--sg-text);
}

.wk-d-hero {
    display: grid;
    gap: 36px;
    margin-top: clamp(22px, 2.6vw, 36px);
}

/* 題名の下のメタ行（種類の色の線＋種類名、領域・業界）。見出しの上には小ラベルを置かない */
.wk-d-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
    margin-top: 14px;
}

.wk-d-class {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--sg-mute);
}

.wk-sep {
    width: 1px;
    height: 11px;
    background: rgba(var(--sg-silver-rgb), .3);
}

.wk-d-h1 {
    margin-top: 0;
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: .04em;
    color: var(--sg-white);
    text-wrap: balance;
}

.wk-d-catch {
    margin-top: 14px;
    font-size: clamp(17px, 1.4vw, 20px);
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: .04em;
    color: var(--sg-text);
}

.wk-d-summary {
    margin-top: 14px;
    max-width: 40em;
    font-size: 15px;
    line-height: 2;
    color: var(--sg-text);
}

.wk-d-facts {
    display: grid;
    gap: 18px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--sg-line-faint);
}

.wk-fact {
    display: grid;
    grid-template-columns: 5.6em minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.wk-fact dt {
    padding-top: 3px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .12em;
    color: var(--sg-brass);
}

.wk-fact .wk-tags {
    margin-top: 0;
    padding: 0;
}

/* 担当範囲: 5 工程の目盛り。担当した工程は種類の色の印 */
.wk-phases {
    list-style: none;
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 420px;
}

.wk-phases::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 8px;
    height: 1px;
    background: rgba(var(--sg-silver-rgb), .28);
}

.wk-phase {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wk-phase-dot {
    width: 15px;
    height: 15px;
    border: 1px solid rgba(var(--sg-silver-rgb), .45);
    border-radius: 50%;
    background: var(--sg-ground);
}

.wk-phase-l {
    font-size: 12px;
    letter-spacing: .02em;
    color: var(--sg-mute);
    white-space: nowrap;
}

.wk-phase.is-on .wk-phase-dot {
    border-color: var(--kc);
    background: radial-gradient(circle, var(--kc) 0 3.5px, transparent 4px), var(--sg-ground);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kc) 16%, transparent);
}

.wk-phase.is-on .wk-phase-l {
    font-weight: 700;
    color: var(--sg-white);
}

.wk-d-credit {
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--sg-mute);
}

/* 主ビジュアル（構成図）。段階7でこの列に画面モックを足す */
.wk-d-visual {
    display: grid;
    gap: 22px;
}

.wk-d-fig {
    position: relative;
    margin: 0;
    padding: clamp(14px, 2.2vw, 32px) clamp(10px, 2.2vw, 32px) clamp(14px, 1.8vw, 24px);
    border: 1px solid rgba(var(--sg-silver-rgb), .28);
    background: linear-gradient(180deg, rgba(var(--sg-silver-rgb), .03), rgba(var(--sg-silver-rgb), 0) 70%);
    isolation: isolate;
    overflow: hidden;
}

.wk-d-fig::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--kc);
    opacity: .85;
}

.wk-d-fig .wk-glow {
    width: 560px;
    height: 560px;
    margin: -280px 0 0 -280px;
}

.wk-d-fig .wk-cap {
    margin-top: 10px;
    font-size: 12px;
}

@media (max-width: 639px) {
    .wk-fact {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
}

@media (min-width: 1024px) {
    .wk-d-hero {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: clamp(40px, 4vw, 72px);
        align-items: start;
    }
}

/* 画面イメージ（scripts/lib/work-mocks.mjs が出力。正本は data/work-mocks.json、画像は scripts/tools/work-mocks/ で書き出した WebP）。
   作った画面の見本を、製品写真のように並べる。PC 画面は CSS で描いたブラウザ枠、スマホ画面は端末枠に入れる。
   画面は明るいまま（サイトがダークでもライトでも）。位置は画面の種類と順番（data-slot: d1・d2・m1・m2）で決める。
   1024px 以上は重ねた構図、640〜1023px は 2 段、640px 未満は縦に 1 列（各画像の下に画面名）。 */
.wk-mocks-sub {
    display: inline-block;
    margin-left: .3em;
    font-size: .58em;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--sg-mute);
}

.wk-mocks-note {
    max-width: 46em;
    margin-top: calc(-1 * clamp(8px, 1vw, 14px));
}

.wk-mocks-stage {
    position: relative;
    margin-top: clamp(24px, 3vw, 44px);
    aspect-ratio: 1200 / 760;
}

.wk-shot {
    position: absolute;
    left: var(--sx);
    top: var(--sy);
    width: var(--sw);
    z-index: var(--sz, 1);
    margin: 0;
}

/* 1200×760 の構図の上の位置。PC 画面は幅 54%、スマホ画面は 15% */
.wk-shot[data-slot="d1"] { --sx: 0%; --sy: 0%; --sw: 54%; --sz: 1; }
.wk-shot[data-slot="d2"] { --sx: 46%; --sy: 40%; --sw: 54%; --sz: 2; }
.wk-shot[data-slot="m1"] { --sx: 9%; --sy: 45%; --sw: 15%; --sz: 3; }
.wk-shot[data-slot="m2"] { --sx: 79%; --sy: 1%; --sw: 15%; --sz: 3; }

.wk-shot-frame {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fff;
    color: #1f2329;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18), 0 28px 56px -18px rgba(0, 0, 0, .62);
    transition: transform .25s ease, box-shadow .25s ease;
}

:root[data-theme="light"] .wk-shot-frame {
    box-shadow: 0 1px 3px rgba(16, 24, 40, .1), 0 24px 48px -18px rgba(16, 24, 40, .3);
}

.wk-shot-frame:hover {
    transform: translateY(-3px);
}

.wk-shot-frame:focus-visible {
    outline: 2px solid var(--sg-brass);
    outline-offset: 4px;
}

.wk-shot-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* PC: 簡潔なブラウザ枠 */
.wk-shot-desktop .wk-shot-frame {
    border-radius: 9px;
    border: 1px solid rgba(16, 24, 40, .14);
}

.wk-shot-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: clamp(20px, 2vw, 28px);
    padding: 0 12px;
    background: #eceef2;
    border-bottom: 1px solid #dde1e7;
}

.wk-shot-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c8cdd5;
}

.wk-shot-bar span {
    flex: 0 1 46%;
    margin: 0 auto;
    padding: 1px 10px;
    border-radius: 6px;
    background: #fff;
    color: #667085;
    font: 500 11px/1.6 system-ui, sans-serif;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateX(-21px); /* 左の丸 3 つぶん、中央に寄せる */
}

/* スマホ: 端末枠 */
.wk-shot-mobile .wk-shot-frame {
    padding: clamp(5px, .6vw, 8px);
    border-radius: clamp(22px, 2.6vw, 34px);
    background: #16191f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .2), 0 30px 56px -16px rgba(0, 0, 0, .65);
}

:root[data-theme="light"] .wk-shot-mobile .wk-shot-frame {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 1px 3px rgba(16, 24, 40, .14), 0 26px 48px -16px rgba(16, 24, 40, .36);
}

.wk-shot-mobile .wk-shot-frame img {
    border-radius: clamp(16px, 2vw, 27px);
}

.wk-shot-island {
    position: absolute;
    top: calc(clamp(5px, .6vw, 8px) + 1.3%);
    left: 50%;
    width: 30%;
    aspect-ratio: 3.6;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #0a0b0d;
    z-index: 1;
}

.wk-shot-cap {
    display: none;
}

/* 640〜1023px: PC 画面とスマホ画面の組を 2 段に */
@media (max-width: 1023px) {
    .wk-mocks-stage {
        aspect-ratio: 1200 / 1700;
    }

    .wk-mocks[data-shots="1"] .wk-mocks-stage {
        aspect-ratio: 1200 / 1520;
    }

    .wk-mocks[data-shots="1"] .wk-shot[data-slot="d2"] {
        --sy: 56%;
    }

    .wk-shot[data-slot="d1"] { --sx: 0%; --sy: 0%; --sw: 80%; --sz: 1; }
    .wk-shot[data-slot="m1"] { --sx: 70%; --sy: 6%; --sw: 28%; --sz: 3; }
    .wk-shot[data-slot="d2"] { --sx: 20%; --sy: 50%; --sw: 80%; --sz: 2; }
    .wk-shot[data-slot="m2"] { --sx: 2%; --sy: 55%; --sw: 28%; --sz: 3; }
}

/* 640px 未満: 縦に 1 列（PC → スマホの順）。各画像の下に画面名 */
@media (max-width: 639px) {
    .wk-mocks-stage {
        display: flex;
        flex-direction: column;
        gap: 28px;
        aspect-ratio: auto;
    }

    .wk-mocks[data-shots="1"] .wk-mocks-stage {
        aspect-ratio: auto;
    }

    .wk-shot {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
    }

    .wk-shot[data-slot="d1"] { order: 1; }
    .wk-shot[data-slot="m1"] { order: 2; }
    .wk-shot[data-slot="d2"] { order: 3; }
    .wk-shot[data-slot="m2"] { order: 4; }

    .wk-shot-mobile .wk-shot-frame {
        width: min(64%, 250px);
        margin: 0 auto;
    }

    .wk-shot-cap {
        display: block;
        margin-top: 10px;
        font-size: .82rem;
        color: var(--sg-mute);
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wk-shot-frame {
        transition: none;
    }

    .wk-shot-frame:hover {
        transform: none;
    }
}

/* 仕様書（項目名と内容の行） */
.wk-spec {
    border-top: 1px solid rgba(var(--sg-silver-rgb), .32);
}

.wk-spec-row {
    display: grid;
    gap: 12px;
    padding: 24px 0;
    border-bottom: 1px solid var(--sg-line-faint);
}

.wk-spec-h {
    align-self: start;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .08em;
    color: var(--sg-white);
}

.wk-spec-h::before {
    content: "";
    flex: none;
    width: 14px;
    height: 1px;
    background: var(--kc);
}

.wk-spec-c {
    max-width: 46em;
    font-size: 15px;
    line-height: 2;
    color: var(--sg-text);
}

.wk-gloss .wk-spec-c {
    max-width: none;
}

@media (min-width: 1024px) {
    .wk-spec-row {
        grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
        gap: 40px;
        padding: 30px 0;
    }

    .wk-spec-h {
        padding-top: 3px;
    }
}

.wk-list {
    list-style: none;
    display: grid;
    gap: 4px;
}

.wk-list li {
    position: relative;
    padding-left: 1.5em;
}

/* 項目の印: 種類の色の小さな菱形 */
.wk-list li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: .82em;
    width: 7px;
    height: 7px;
    border: 1px solid var(--kc);
    transform: rotate(45deg);
}

.wk-techs li {
    padding: 3px 13px;
    font-size: 12px;
}

/* 和文を含む技術名は和文書体（Michroma の欧文と見た目の大きさをそろえる） */
.wk-tags li.is-jp,
.wk-techs li.is-jp {
    font-family: var(--sg-jp);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.58;
    letter-spacing: .04em;
}

.wk-techs li.is-jp {
    font-size: 13.5px;
    line-height: 1.6;
}

.wk-note {
    font-size: 13px;
    line-height: 1.8;
    color: var(--sg-mute);
}

.wk-details {
    margin-top: 14px;
}

.wk-sum {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 6px 18px;
    border: 1px solid rgba(var(--sg-silver-rgb), .42);
    border-radius: 999px;
    font-size: 13.5px;
    letter-spacing: .06em;
    color: var(--sg-white);
    list-style: none;
    cursor: pointer;
    transition: border-color .25s var(--sg-ease-out);
}

.wk-sum::-webkit-details-marker {
    display: none;
}

.wk-sum:hover {
    border-color: var(--sg-silver);
}

.wk-sum-close,
.wk-details[open] .wk-sum-open {
    display: none;
}

.wk-details[open] .wk-sum-close {
    display: inline;
}

/* 開閉の印: 細い線の「＋」→「−」 */
.wk-sum-ic {
    position: relative;
    flex: none;
    width: 12px;
    height: 12px;
}

.wk-sum-ic::before,
.wk-sum-ic::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 1px;
    background: var(--sg-silver);
    transition: transform .35s var(--sg-ease-out), opacity .35s var(--sg-ease-out);
}

.wk-sum-ic::after {
    transform: rotate(90deg);
}

.wk-details[open] .wk-sum-ic::after {
    transform: rotate(0deg);
    opacity: 0;
}

.wk-gloss-list {
    display: grid;
    gap: 14px 36px;
    margin-top: 20px;
}

.wk-gloss-item {
    padding-top: 12px;
    border-top: 1px solid var(--sg-line-faint);
}

.wk-gloss-item dt {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--sg-white);
}

.wk-gloss-item dd {
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--sg-mute);
}

@media (min-width: 768px) {
    .wk-gloss-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* この課題のページ（四隅の括弧の枠） */
.wk-sol-panel {
    position: relative;
    display: grid;
    gap: 32px;
    padding: clamp(22px, 3vw, 40px);
    border: 1px solid rgba(var(--sg-silver-rgb), .3);
    background: linear-gradient(90deg, rgba(var(--sg-silver-rgb), .035), rgba(var(--sg-silver-rgb), .01));
}

.wk-sol-panel::before,
.wk-sol-panel::after,
.wk-cta-panel::before,
.wk-cta-panel::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
    border: 1px solid var(--sg-silver);
    opacity: .7;
}

.wk-sol-panel::before,
.wk-cta-panel::before {
    left: -1px;
    top: -1px;
    border-right: 0;
    border-bottom: 0;
}

.wk-sol-panel::after,
.wk-cta-panel::after {
    right: -1px;
    bottom: -1px;
    border-left: 0;
    border-top: 0;
}

.wk-sol .wk-h2 {
    margin-bottom: 18px;
    font-size: clamp(18px, 1.6vw, 22px);
}

.wk-sol-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .06em;
    color: var(--sg-white);
}

.wk-sol-ic {
    flex: none;
}

.wk-sol-ic .sgi {
    width: 40px;
    height: 40px;
}

.wk-sol-lead {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--sg-text);
}

.wk-check {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.wk-check li {
    display: grid;
    grid-template-columns: 2.6em minmax(0, 1fr);
    gap: 8px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--sg-text);
}

.wk-check-n {
    padding-top: 2px;
    font-family: var(--sg-en);
    font-size: 12px;
    color: var(--sg-brass);
}

@media (min-width: 1024px) {
    .wk-sol-panel {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: clamp(32px, 4vw, 64px);
    }

    .wk-sol-check {
        padding-left: clamp(32px, 4vw, 64px);
        border-left: 1px solid var(--sg-line-faint);
    }
}

/* この実績に関する記事 */
.wk-art-list {
    list-style: none;
    border-top: 1px solid rgba(var(--sg-silver-rgb), .32);
}

.wk-art {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 4px 20px;
    align-items: center;
    padding: 18px 4px;
    border-bottom: 1px solid var(--sg-line-faint);
    transition: background-color .3s var(--sg-ease-out);
}

.wk-art:hover {
    background-color: rgba(var(--sg-silver-rgb), .03);
}

.wk-art-t {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .04em;
    color: var(--sg-white);
}

.wk-art-d {
    grid-column: 1;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--sg-mute);
}

.wk-art-go {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    color: rgba(var(--sg-silver-rgb), .6);
}

.wk-art:hover .wk-art-go {
    color: var(--sg-white);
}

.wk-art:hover .wk-arr {
    transform: translateX(4px);
}

/* ==========================================================================
   相談の帯（ページの最後。フッターの目盛りの罫と地続きにしないよう、枠に入れて下に余白を取る）
   ========================================================================== */
.wk-cta {
    margin-top: clamp(72px, 8vw, 120px);
    padding-bottom: clamp(72px, 8vw, 112px);
}

.wk-cta-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 4.4vw, 64px) clamp(22px, 4.4vw, 64px);
    border: 1px solid rgba(var(--sg-silver-rgb), .34);
    background:
        radial-gradient(640px 360px at 88% 50%, rgba(var(--sg-brass-rgb), .12), transparent 70%),
        var(--sg-raise);
}

.wk-cta-copy {
    position: relative;
    z-index: 1;
    max-width: 40em;
}

.wk-cta-h {
    font-size: clamp(24px, 2.6vw, 36px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: .06em;
    color: var(--sg-white);
}

.wk-cta-body {
    margin-top: 14px;
    max-width: 36em;
    font-size: 15px;
    line-height: 2;
    color: var(--sg-text);
}

.wk-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.wk-cta-btn {
    padding: 18px 30px;
    font-size: 15px;
}

.sg-btn-red:hover .wk-arr,
.wk-btn-line:hover .wk-arr {
    transform: translateX(4px);
}

.wk-btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 15px 26px;
    border: 1px solid rgba(var(--sg-silver-rgb), .6);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--sg-white);
    cursor: pointer;
    transition: border-color .25s var(--sg-ease-out), background-color .25s var(--sg-ease-out);
}

.wk-btn-line:hover {
    border-color: var(--sg-white);
    background-color: rgba(var(--sg-silver-rgb), .05);
}

/* 帯の右の陣（装飾） */
.wk-cta-sigil {
    position: absolute;
    right: -70px;
    top: 50%;
    width: 360px;
    height: 360px;
    margin-top: -180px;
    opacity: .5;
    pointer-events: none;
}

.wk-cta-sigil .qs {
    width: 100%;
    height: 100%;
}

.wk-cta-sigil .qs-q3 .qs-arc {
    stroke-opacity: .9;
}

@media (max-width: 1023px) {
    .wk-cta-sigil {
        right: -150px;
        opacity: .22;
    }
}

@media (max-width: 639px) {
    .wk-cta-sigil {
        top: auto;
        bottom: -200px;
        margin-top: 0;
        right: -170px;
    }

    .wk-cta-actions > a {
        width: 100%;
    }
}

/* 狭い画面: 最初の画面の縦の長さを詰める（導入文・注記・入口の目次） */
@media (max-width: 639px) {
    .wk-statement {
        font-size: 17px;
    }

    .wk-lead {
        font-size: 14px;
        line-height: 1.8;
    }

    .wk-notice {
        font-size: 12px;
        line-height: 1.75;
    }

    .wk-intro {
        gap: 24px;
    }

    .wk-entry {
        grid-template-columns: 24px minmax(0, 1fr) auto 16px;
        gap: 10px;
        padding: 4px 12px;
    }

    .wk-entry .sgi {
        width: 24px;
        height: 24px;
    }

    .wk-entry-label {
        font-size: 14px;
    }

    .wk-catalog {
        margin-top: 24px;
    }
}

/* ライト版（style.css の :root[data-theme="light"]）: 明るい地では光の滲みが灰色に濁るので消し、
   図は一段明るい面（方眼紙の上に置いた図面）として地から持ち上げる */
:root[data-theme="light"] .wk-glow {
    display: none;
}

:root[data-theme="light"] .wk-card,
:root[data-theme="light"] .wk-d-fig {
    background: var(--sg-raise);
}
