/* TENKA LAB 作品例の紹介ページ（スマホ優先。768px・1024px で広げる） */
:root {
  --c-bg: #F7F6F2;
  --c-surface: #FFFFFF;
  --c-main: #1B2A41;          /* 会社の色（深い紺） */
  --c-accent: #B8461B;        /* 行動ボタンだけ */
  --c-accent-hover: #963814;
  --c-text: #1F2430;
  --c-sub: #4F5664;
  --c-line: #E3E0D8;
  --c-tag: #F1EFE9;
  --c-strip: #EEECE6;
  --c-on-dark-sub: #D6DCE6;
  --c-focus: #C2410C;

  /* サムネイルの背景（各作品の配色に合わせる） */
  --c-rest-bg: #1C1915;
  --c-salon-bg: #F3E4E0;
  --c-chat-bg: #E3EEEA;
  --c-demo-bg: #EAF0E6;
  --c-sheet-bg: #E4EFE8;
  --c-dash-bg: #EFE6DC;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;

  --section-y: 64px;
  --card-gap: 24px;
  --card-pad: 20px;
  --max: 1120px;
  --font: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4 { margin: 0; font-feature-settings: "palt" 1; }
p, ul { margin: 0; }
img { max-width: 100%; }

a { color: var(--c-main); }
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--sp-2);
}

.ib { display: inline-block; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--sp-2);
  top: -100px;
  padding: var(--sp-1) var(--sp-2);
  background: var(--c-surface);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: var(--sp-1); }

/* 英字ラベル（WORKS / WEBSITE / SYSTEM / CONTACT） */
.label {
  color: var(--c-main);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1.6;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 64px;
}
.brand {
  color: var(--c-main);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
  white-space: nowrap;
}
.site-nav ul {
  display: flex;
  gap: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--sp-1);
  color: var(--c-text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.site-nav a:hover { color: var(--c-main); text-decoration: underline; text-underline-offset: 4px; }

/* ヘッダー直下の「架空のお店」の帯 */
.fake-strip {
  padding: var(--sp-1) var(--sp-2);
  background: var(--c-strip);
  color: var(--c-sub);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- ファーストビュー ---------- */
.hero { padding: var(--sp-6) 0 var(--sp-8); }
.hero__inner { display: grid; gap: var(--sp-6); align-items: center; }
.hero h1 {
  margin-top: var(--sp-1);
  font-size: 28px;
  line-height: 1.45;
  letter-spacing: .02em;
}
.hero__lead {
  max-width: 32em;
  margin-top: var(--sp-2);
  color: var(--c-sub);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

/* 画面の枠（PC＝ブラウザの帯つき、スマホ＝黒い縁） */
.frame-pc {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: var(--c-surface);
}
.frame-pc::before {
  content: "";
  display: block;
  height: 18px;
  background-color: #ECEAE4;
  /* ブラウザの上の帯。左に丸を3つ（左 50px の範囲だけ） */
  background-image:
    radial-gradient(circle, #C9C5BC 3px, transparent 3.5px),
    radial-gradient(circle, #C9C5BC 3px, transparent 3.5px),
    radial-gradient(circle, #C9C5BC 3px, transparent 3.5px);
  background-size: 14px 18px;
  background-repeat: no-repeat;
  background-position: 4px 0, 18px 0, 32px 0;
}
.frame-pc img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.frame-sp {
  overflow: hidden;
  border: 4px solid #1F2430;
  border-radius: 18px;
  background: #1F2430;
}
.frame-sp img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 1000;
  object-fit: cover;
  object-position: top;
  border-radius: 13px;
}

/* コラージュ（北燈の PC・美容室の PC・デモ①のスマホを重ねる） */
.collage {
  position: relative;
  aspect-ratio: 4 / 3;
}
.collage > * {
  position: absolute;
  box-shadow: 0 20px 48px rgba(27, 42, 65, .18);
}
.collage__back { left: 0; top: 0; width: 78%; }
.collage__front { right: 0; bottom: 6%; width: 62%; z-index: 1; }
.collage__sp { left: 6%; bottom: 0; width: 22%; z-index: 2; }

/* ---------- 制作実績（実在のサイト） ---------- */
/* 作品例（架空）と分けるため、白い帯の上に置く */
.results {
  padding: var(--section-y) 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.results .card { background: var(--c-bg); }
.group__lead {
  max-width: 40em;
  margin-top: var(--sp-1);
  color: var(--c-sub);
  font-size: 15px;
  line-height: 1.7;
}
.thumb--dview { background: #0B1626; }
.thumb--sync { background: #161214; }
.thumb .thumb__pc--solo { left: 8%; top: 14%; width: 84%; }
.thumb__chip--real { background: #FFFFFF; color: var(--c-main); }

/* ---------- 作品一覧 ---------- */
.works { padding: var(--section-y) 0; }
.works__title {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.5;
}
.works__head + .group { margin-top: var(--sp-6); }
.group + .group { margin-top: var(--section-y); }
.group__title {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.5;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--card-gap);
  margin-top: var(--sp-3);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  overflow: hidden;
}
@media (hover: hover) {
  .card { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(31, 36, 48, .12);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card:hover { transition: none; transform: none; }
  .points__icon::after { transition: none; }
}

/* サムネイル（実際の画面：PC の枠＋スマホの枠） */
.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.thumb--restaurant { background: var(--c-rest-bg); }
.thumb--salon { background: var(--c-salon-bg); }
.thumb--chat { background: var(--c-chat-bg); }
.thumb--demo { background: var(--c-demo-bg); }
.thumb--sheet { background: var(--c-sheet-bg); }
.thumb--dash { background: var(--c-dash-bg); }
.thumb__pc {
  position: absolute;
  left: 6%;
  top: 10%;
  width: 80%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}
.thumb__sp {
  position: absolute;
  right: 6%;
  bottom: -8%;
  width: 22%;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}
.thumb__chip {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 2px 10px;
  background: rgba(255, 255, 255, .94);
  border-radius: 999px;
  color: #1F2430;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

/* 05 売上管理シートの仮サムネイル（CSS だけ） */
.sheet {
  position: absolute;
  left: 10%;
  top: 12%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 80%;
  height: 76%;
  padding: 16px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(30, 77, 54, .18);
  container-type: inline-size;
}
.sheet__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sheet__kpi {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  background: #F1F6F3;
  border-radius: 6px;
  line-height: 1.4;
}
.sheet__kpi span { color: var(--c-sub); font-size: 11px; white-space: nowrap; }
.sheet__kpi b {
  color: #1E4D36;
  font-size: 18px;
  font-size: min(18px, 5.2cqi);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sheet__bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  flex: 1;
  border-bottom: 1px solid #D5E3DA;
}
.sheet__bars span {
  width: 10%;
  background: #2F6B4C;
  border-radius: 3px 3px 0 0;
}
.sheet__bars .h40 { height: 40%; }
.sheet__bars .h55 { height: 55%; }
.sheet__bars .h48 { height: 48%; }
.sheet__bars .h70 { height: 70%; }
.sheet__bars .h62 { height: 62%; }
.sheet__bars .h82 { height: 82%; }

/* カード本文 */
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--card-pad);
}
.card__kind {
  color: var(--c-main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.6;
}
.card h3 {
  margin-top: 4px;
  font-size: 19px;
  line-height: 1.45;
}
.card__sub {
  margin-top: 4px;
  color: var(--c-sub);
  font-size: 15px;
  line-height: 1.7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--sp-2);
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 2px 10px;
  background: var(--c-tag);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
}

/* 制作のポイント（折りたたみ） */
.points {
  margin-top: var(--sp-2);
  border-top: 1px solid var(--c-line);
}
.points summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 48px;
  color: var(--c-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.points summary::-webkit-details-marker { display: none; }
.points summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.points__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.points__icon::before,
.points__icon::after {
  content: "";
  position: absolute;
  background: var(--c-main);
}
.points__icon::before { left: 0; right: 0; top: 50%; height: 1.5px; transform: translateY(-50%); }
.points__icon::after {
  top: 0; bottom: 0; left: 50%; width: 1.5px;
  transform: translateX(-50%);
  transition: transform .2s ease, opacity .2s ease;
}
.points[open] .points__icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.points__body {
  padding-bottom: var(--sp-1);
  font-size: 15px;
}
.points__body h4 {
  margin-top: var(--sp-1);
  color: var(--c-sub);
  font-size: 13px;
  line-height: 1.6;
}
.points__body h4 + p,
.points__body h4 + ul { margin-top: 4px; }
.points__body p + h4 { margin-top: var(--sp-2); }
.list { padding-left: 1.25em; }
.list li + li { margin-top: var(--sp-1); }

/* ボタン */
/* ボタンと補足文をひとまとめにし、カードの下にそろえる（補足文の行数が違ってもボタンの高さがそろう） */
.card__foot {
  margin-top: auto;
  padding-top: var(--sp-3);
}
.nowrap { white-space: nowrap; }
/* 幅 340px 未満の端末では、題の折り返し位置の指定より、はみ出さないことを優先する */
@media (max-width: 339px) { .nowrap { white-space: normal; } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  width: 100%;
  min-height: 48px;
  padding: var(--sp-1) var(--sp-3);
  background: var(--c-accent);
  border: 2px solid var(--c-accent);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--c-accent-hover); border-color: var(--c-accent-hover); color: #FFFFFF; }
.btn__arrow { flex: none; }
.btn--sub {
  background: #FFFFFF;
  border-color: var(--c-main);
  color: var(--c-main);
}
.btn--sub:hover { background: var(--c-tag); border-color: var(--c-main); color: var(--c-main); }
.card__small {
  margin: var(--sp-1) 0 0;
  color: var(--c-sub);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- ご相談 ---------- */
.contact {
  padding: var(--section-y) 0;
  background: var(--c-main);
  color: #FFFFFF;
}
.label--on-dark { color: var(--c-on-dark-sub); }
.contact h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.5;
}
.contact p:last-child {
  max-width: 40em;
  margin-top: var(--sp-2);
  color: var(--c-on-dark-sub);
}

/* ---------- フッター ---------- */
.site-footer {
  padding: var(--sp-4) 0;
  color: var(--c-sub);
  font-size: 13px;
  line-height: 1.7;
}
.site-footer p + p { margin-top: 4px; }

@media (min-width: 768px) {
  :root { --card-gap: 32px; --card-pad: 24px; }
  .wrap { padding: 0 var(--sp-4); }
  .cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__foot .card__small { min-height: calc(13px * 1.7 * 3); }   /* 3行分 */
}

/* 768〜1023px はカードが細く、04 の補足文が4行になるので4行分を確保（ボタンの高さをそろえる） */
@media (min-width: 768px) and (max-width: 1023px) {
  .card__foot .card__small { min-height: calc(13px * 1.7 * 4); }
}

@media (min-width: 1024px) {
  :root { --section-y: 96px; }
  .label { font-size: 13px; }
  .hero { padding: var(--sp-12) 0; }
  /* h1 の3つの句（最長「まとめてお任せください。」12字）が1行ずつ収まるよう 1:1 にする */
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); }
  .hero h1 { font-size: clamp(34px, 3.4vw, 40px); line-height: 1.35; }
  .hero__lead { font-size: 18px; }
  .group__title, .contact h2 { font-size: 30px; }
  .works__title { font-size: 34px; }
  .works__head + .group { margin-top: var(--sp-8); }
  .card h3 { font-size: 20px; }
}

/* 375px 前後：ブランドとメニュー3つを1行に収める */
@media (max-width: 400px) {
  .brand { font-size: 18px; letter-spacing: .08em; }
  .site-nav a { padding: 0 6px; }
}
/* 320px 前後：さらに詰めて1行に収める */
@media (max-width: 339px) {
  .brand { font-size: 17px; letter-spacing: .04em; }
  .site-nav a { padding: 0 4px; font-size: 13px; }
}

/* ---------- 作品例の絞り込み ---------- */
/* JS が無いときは .filter が hidden のまま＝今と同じ全件表示 */
:root { --c-control-line: #7A808C; }   /* 押せる部品の輪郭（背景比 3.7:1） */
.filter[hidden], .filter__reset[hidden], .filter__bottom[hidden],
.works .card[hidden], .works .group[hidden], .filter__empty[hidden] { display: none; }
.filter { margin-top: var(--sp-3); }
.filter__label {
  color: var(--c-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  max-width: 100%;
  margin-top: var(--sp-1);
}
.filter__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 16px 0 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-control-line);
  border-radius: 999px;
  color: var(--c-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.filter__mark {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  background: #FFFFFF;
  border: 1.5px solid var(--c-control-line);
  border-radius: 50%;
}
.filter__count {
  margin-left: 6px;
  color: var(--c-sub);
  font-size: 13px;
  font-weight: 400;
}
@media (hover: hover) {
  .filter__chip:hover { background: var(--c-tag); border-color: var(--c-main); }
}
/* 選択中：色の反転＋丸印がチェックに変わる＋aria-pressed（色だけに頼らない） */
.filter__chip[aria-pressed="true"],
.filter__chip[aria-pressed="true"]:hover {
  background: var(--c-main);
  border-color: var(--c-main);
  color: #FFFFFF;
}
.filter__chip[aria-pressed="true"] .filter__count { color: var(--c-on-dark-sub); }
.filter__chip[aria-pressed="true"] .filter__mark { border-color: #FFFFFF; }
.filter__chip[aria-pressed="true"] .filter__mark::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid var(--c-main);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.filter__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--sp-1);
  margin-top: var(--sp-2);
}
.filter__status {
  color: var(--c-sub);
  font-size: 14px;
  line-height: 1.7;
}
.filter__reset {
  min-height: 44px;
  margin: 0;
  padding: 0 var(--sp-1);
  background: none;
  border: 0;
  color: var(--c-main);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.filter__bottom { margin-top: var(--sp-4); text-align: center; }
.filter__reset-bottom { font-family: inherit; cursor: pointer; }
.filter__empty {
  padding: var(--sp-3);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.filter__empty .btn { margin-top: var(--sp-2); font-family: inherit; cursor: pointer; }
/* 1つ目のグループが消えたとき、2つ目の上の余白を見出し直下の値にそろえる */
.works__head + .group[hidden] + .group { margin-top: var(--sp-6); }
.card.is-in { animation: filter-in .2s ease; }
@keyframes filter-in { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 768px) {
  .filter__reset-bottom, .filter__empty .btn { width: auto; min-width: 320px; }
}
@media (min-width: 1024px) {
  .works__head + .group[hidden] + .group { margin-top: var(--sp-8); }
}
@media (prefers-reduced-motion: reduce) {
  .filter__chip { transition: none; }
  .card.is-in { animation: none; }
}
