/* 新しい作業実績欄の見た目。色・書体・ボタンは現行（配色B）の値を使い、新しい色は足さない。
   .wr-on は「新しい欄を出している」しるし（boot.mjs が付ける）。付いていないときは、もとのまま何も変えない。 */
.wr { --k-ink: #2e3950; --k-title: #1c2c5c; --k-soft: #5f6676; --k-line: rgba(46, 57, 80, .16); --k-paper2: #f1eee3; --k-navy: #1f3266;
  --k-sh: 0 1px 2px rgba(28, 44, 92, .05), 0 14px 30px -18px rgba(28, 44, 92, .32);
  --k-sh2: 0 2px 4px rgba(28, 44, 92, .06), 0 24px 44px -20px rgba(28, 44, 92, .42);
  --k-ease: cubic-bezier(.2, .7, .2, 1);
  color: var(--k-ink); text-align: left; }

/* もとの中身は残したまま、新しい欄を出しているあいだだけしまう */
#works.wr-on .works-grid, #works.wr-on .works-foot, #works.wr-on [data-works-sample-note] { display: none; }
.works-archive.wr-on > .section-shell > :not(.wr) { display: none; }
.case-article.wr-on > .case-loading { display: none; }
/* 地は、サイトのもとの地（生成り）にそろえる */
#works.wr-on, main.works-page:has(.wr-on) { background: #fcfaf1; }
#works.wr-on .works-head { margin-bottom: clamp(22px, 2.6vw, 36px); }

.wr *, .wr *::before, .wr *::after { box-sizing: border-box; }
.wr p, .wr dl, .wr dd, .wr blockquote { margin: 0; }
.wr h1, .wr h2, .wr h3 { margin: 0; color: var(--k-title); font-weight: 700; line-height: 1.55; letter-spacing: .05em; }
.wr ul, .wr ol { margin: 0; padding: 0; list-style: none; }
.wr button, .wr select { font: inherit; color: inherit; letter-spacing: inherit; }
.wr :focus-visible { outline: 2px solid var(--k-title); outline-offset: 3px; }
.wr [hidden] { display: none !important; }
.wr-stale { margin-bottom: 18px !important; padding: 10px 0; border-top: 1px solid var(--k-line); border-bottom: 1px solid var(--k-line); font-size: .86rem; }
.wr-loading { padding: 48px 0; color: var(--k-soft); text-align: center; }
.wr-state { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--k-line); border-radius: 18px; background: #fff; }
.wr-state p + p { margin-top: .6em; }
.wr-state-t { color: var(--k-title); font-size: 1.1rem; font-weight: 700; letter-spacing: .05em; }
.wr-state-a { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0 !important; }
.wr-btn { display: inline-flex; align-items: center; gap: 1em; min-height: 46px; padding: .7em 1.7em; border: 1px solid var(--k-navy); border-radius: 999px; background: var(--k-navy); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; }
.wr-btn--ghost { border-color: var(--k-ink); background: transparent; color: var(--k-ink); }
.wr .btn-more { cursor: pointer; }
.wr .btn-more--ghost { --c-ghost: var(--k-ink); --c-ghost-hover: var(--k-title); }
.wr-chip-x { min-height: 40px; padding: 0 2px; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--k-soft); font-size: .78rem; letter-spacing: .06em; cursor: pointer; }
.wr-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px !important; }
.wr-tag { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 1em; border: 1px solid var(--k-line); border-radius: 999px; background: #fff; color: var(--k-ink); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; transition: border-color .3s ease; }
.wr-tag:hover { border-color: var(--k-title); }
.wr-tag span { color: var(--k-soft); font-size: .66rem; font-weight: 400; }

/* 写真 */
.wr-photos { display: grid; gap: 4px; margin: 0; }
.wr-photos[data-n="0"] { display: none; }
.wr-photos[data-n="2"] { grid-template-columns: 1fr 1fr; }
.wr-ph { position: relative; display: block; margin: 0; overflow: hidden; border-radius: 10px; background: #e9e4d6; aspect-ratio: 4 / 3; }
.wr-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale 1s var(--k-ease); }
.wr-ph figcaption { position: absolute; left: 8px; top: 8px; padding: 0 .8em; border-radius: 999px; background: rgba(252, 250, 241, .94); color: var(--k-title); font-size: .66rem; font-weight: 700; letter-spacing: .08em; line-height: 1.9; }
.wr-ph--after figcaption { background: var(--k-navy); color: #fff; }

/* サービスの選択と地域の選択 */
.k-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.k-filter--sub { justify-content: flex-start; margin-top: 12px; }
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.k-chips button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--k-line); border-radius: 999px; background: #fff; color: var(--k-ink); font-size: .84rem; font-weight: 700; letter-spacing: .05em; white-space: nowrap; cursor: pointer; transition: border-color .3s ease, background .3s ease, color .3s ease; }
.k-chips button:first-child { padding-left: 16px; }
.k-chips button:hover { border-color: var(--k-title); }
.k-chips button b { color: var(--k-soft); font-size: .9rem; font-weight: 400; }
.k-chips button[aria-pressed="true"] { border-color: var(--k-navy); background: var(--k-navy); color: #fff; }
.k-chips button[aria-pressed="true"] b { color: #a9d9cf; }
.k-badge { width: 24px; display: block; flex: none; aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
.k-badge img { display: block; width: 100%; height: 100%; }
.k-badge--32 { width: 32px; }
.k-select { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px 0 16px; border: 1px solid var(--k-line); border-radius: 999px; background: #fff; }
.k-select > span { flex: none; color: var(--k-soft); font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.wr select { appearance: none; -webkit-appearance: none; min-height: 40px; min-width: 9.5em; max-width: 100%; padding: 2px 30px 2px 8px; border: 0; border-radius: 999px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231c2c5c' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center / 10px 7px; font-size: .86rem; font-weight: 700; }
.wr select:disabled { color: #8d909a; font-weight: 500; }
.p-sort { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 999px; background: rgba(46, 57, 80, .08); }
.p-sort button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--k-soft); font-size: .8rem; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.p-sort button[aria-pressed="true"] { background: #fff; box-shadow: 0 3px 10px -4px rgba(28, 44, 92, .3); color: var(--k-title); }

/* 1件のカード（トップと一覧で同じ） */
/* カードの高さは中身のぶんだけ（そろえるために引き伸ばして、カードの中に意味のない空きを作らない） */
.k-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: clamp(16px, 1.8vw, 26px); margin-top: clamp(20px, 2.2vw, 30px) !important; }
@media (min-width: 640px) { .k-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .k-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.k-card { display: flex; }
.k-link { display: flex; flex-direction: column; width: 100%; padding: 10px; border: 1px solid rgba(46, 57, 80, .08); border-radius: 18px; background: #fff; box-shadow: var(--k-sh); color: inherit; text-decoration: none; transition: translate .5s var(--k-ease), box-shadow .5s ease, border-color .3s ease; }
a.k-link:hover { translate: 0 -4px; border-color: rgba(46, 57, 80, .2); box-shadow: var(--k-sh2); }
a.k-link:hover .wr-ph img { scale: 1.04; }
.k-media[data-n="1"] .wr-ph { aspect-ratio: 8 / 3; }                 /* 1枚のときも、2枚並びと同じ高さにそろえる */
.k-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 8px 8px; }
.is-text .k-body { padding-top: 12px; }
.k-sv { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--k-title); font-size: .76rem; font-weight: 700; letter-spacing: .08em; }
.k-plus { color: var(--k-soft); }
.k-title { font-size: clamp(1rem, 1.25vw, 1.1rem); line-height: 1.5; }
.k-what { display: -webkit-box; overflow: hidden; font-size: .84rem; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.is-text .k-what { -webkit-line-clamp: 6; line-clamp: 6; }
.k-items { font-size: .8rem; line-height: 1.7; }
.k-items span { margin-right: .8em; color: var(--k-soft); font-size: .7rem; font-weight: 700; letter-spacing: .08em; }
.k-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-top: auto !important; padding-top: 10px; border-top: 1px solid var(--k-line); color: var(--k-soft); font-size: .76rem; letter-spacing: .04em; }
.k-meta i, .d-place i { margin: 0 .4em; font-style: normal; opacity: .5; }
.k-meta b { color: var(--k-ink); font-weight: 700; }
.k-zero { margin-top: 24px !important; padding: 22px 24px; border: 1px solid var(--k-line); border-radius: 18px; background: #fff; font-size: .9rem; }
.k-foot { display: flex; justify-content: flex-end; margin-top: clamp(24px, 3vw, 40px) !important; }
p.k-foot { justify-content: center; }

/* 一覧 */
.p-result { margin: clamp(22px, 2.6vw, 34px) 0 0; }
.k-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: .86rem; font-weight: 700; letter-spacing: .06em; }
.k-count strong { color: var(--k-title); font-size: clamp(1.6rem, 2.2vw, 2rem); font-weight: 400; line-height: 1; }
.k-count > span { color: var(--k-soft); font-size: .82rem; font-weight: 500; }
.p-items > .k-grid:first-child, .p-items > .wr-state { margin-top: clamp(14px, 1.6vw, 20px) !important; }
.p-group { margin-top: clamp(30px, 3.6vw, 48px); }
.p-group-h { display: flex; align-items: baseline; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--k-ink); font-size: clamp(1.05rem, 1.4vw, 1.2rem); letter-spacing: .08em; }
.p-group-h small { color: var(--k-soft); font-size: .78rem; font-weight: 500; }
.p-group-h small b { margin-right: 2px; color: var(--k-title); font-size: 1.1rem; font-weight: 400; }
.p-group .k-grid { margin-top: clamp(16px, 1.8vw, 22px) !important; }
.works-archive.wr-on { padding-bottom: clamp(72px, 8vw, 112px); }

/* 詳細：パンくずと本文の左端・幅をそろえる（どちらもサイトの共通の幅） */
.case-article.wr-on { padding: clamp(20px, 2.4vw, 32px) 0 clamp(64px, 7vw, 96px); }
.d-head { display: grid; gap: 10px; }
.d-head .k-sv { font-size: .84rem; }
.d-title { font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1.45; }
.d-place { color: var(--k-soft); font-size: .88rem; letter-spacing: .05em; }
.d-photos { margin-top: clamp(22px, 2.6vw, 34px); }
.d-mode { display: inline-flex; margin-bottom: 12px; padding: 3px; border-radius: 999px; background: rgba(46, 57, 80, .08); }
.d-mode button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--k-soft); font-size: .8rem; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.d-mode button[aria-pressed="true"] { background: #fff; box-shadow: 0 3px 10px -4px rgba(28, 44, 92, .3); color: var(--k-title); }
.d-pair { gap: 12px; }
.d-pair .wr-ph, .d-single .wr-ph { border-radius: 14px; }
.d-pair figcaption, .d-single figcaption, .h-ba figcaption { left: 12px; top: 12px; font-size: .72rem; }
.d-single { max-width: 720px; }
.d-cols { display: grid; gap: clamp(28px, 3.4vw, 48px) clamp(40px, 5vw, 80px); margin-top: clamp(30px, 3.6vw, 52px); }
@media (min-width: 960px) { .d-cols { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .d-side { position: sticky; top: 108px; } }
.d-lead { font-size: clamp(.98rem, 1.15vw, 1.06rem); font-weight: 500; line-height: 2.05; }
.d-steps { margin-top: clamp(24px, 2.8vw, 36px) !important; border-top: 1px solid var(--k-line); }
.d-steps li { padding: clamp(18px, 2vw, 24px) 0; border-bottom: 1px solid var(--k-line); }
.d-steps h2 { display: flex; align-items: baseline; gap: 14px; font-size: 1rem; letter-spacing: .08em; }
.d-steps h2 .en { color: var(--k-soft); font-size: .92rem; letter-spacing: .1em; }
.d-steps p { margin-top: 8px; line-height: 2; }
.d-voice { margin-top: clamp(28px, 3.2vw, 44px); padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 34px); border-radius: 16px; background: var(--k-paper2); }
.d-voice h2 { font-size: .84rem; letter-spacing: .1em; }
.d-voice blockquote { margin-top: 8px; font-weight: 500; line-height: 2.05; }
.d-facts { border-top: 1px solid var(--k-ink); }
.d-facts > div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--k-line); }
.d-facts dt { color: var(--k-soft); font-size: .8rem; letter-spacing: .06em; }
.d-facts dd { font-size: .92rem; font-weight: 500; }
.d-others { margin-top: clamp(56px, 6.4vw, 88px); }
.d-others h2 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); letter-spacing: .08em; }
.d-back { margin-top: clamp(36px, 4vw, 52px) !important; text-align: center; }

/* 重ねて見比べる（位置がそろっている組だけ） */
.h-ba { --pos: 50%; position: relative; display: block; max-width: 880px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: #e9e4d6; isolation: isolate; }
.h-ba .wr-ph { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; background: none; }
.h-ba-clip { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.h-ba .wr-ph--after figcaption { left: auto; right: 12px; }
.h-ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(28, 44, 92, .12), 0 0 14px rgba(28, 44, 92, .3); pointer-events: none; }
.h-ba-handle i { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; box-shadow: 0 8px 20px -6px rgba(28, 44, 92, .5); }
.h-ba-handle i::before, .h-ba-handle i::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-top: 2px solid var(--k-title); border-right: 2px solid var(--k-title); }
.h-ba-handle i::before { left: 12px; transform: rotate(-135deg); }
.h-ba-handle i::after { right: 12px; transform: rotate(45deg); }
.h-ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.h-ba:has(.h-ba-range:focus-visible) { outline: 2px solid var(--k-title); outline-offset: 3px; }
.h-ba[data-n="1"] .h-ba-clip { clip-path: none; }
.h-ba[data-n="1"] .h-ba-handle, .h-ba[data-n="1"] .h-ba-range { display: none; }

/* 一覧・詳細の下の、もとの相談の案内との間隔 */
.works-cta.wr-cta { padding-top: 0; }

@media (max-width: 720px) {
  .k-filter { align-items: stretch; }
  .k-chips { flex-wrap: nowrap; margin: 0 -20px; padding: 2px 20px 4px; overflow-x: auto; scrollbar-width: none; }
  .k-chips::-webkit-scrollbar { display: none; }
  .k-select { flex: 1 1 140px; }
  .k-select select { flex: 1; min-width: 0; }
  .p-sort { width: 100%; margin-left: 0; }
  .p-sort button { flex: 1; }
  .k-foot .btn-more { width: 100%; justify-content: center; }
  .d-pair { gap: 6px; }
  .d-facts > div { grid-template-columns: 5.5em minmax(0, 1fr); }
}
