:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --ink: #24221f;
  --sub: #6d6860;
  --line: #e3ded6;
  --accent: #8a5a2b;
  --accent-ink: #ffffff;
  --chip: #efebe4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo",
    sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
header.top {
  padding-top: 28px;
  padding-bottom: 8px;
}
header.top h1 {
  font-size: clamp(22px, 4.5vw, 30px);
  margin: 0;
  letter-spacing: 0.06em;
  font-weight: 700;
}
header.top p {
  margin: 6px 0 0;
  color: var(--sub);
  font-size: 14px;
}
.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.seg {
  display: flex;
  background: var(--chip);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
  color: var(--sub);
}
.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.search {
  flex: 1 1 220px;
  min-width: 0;
  position: relative;
}
.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 14px 9px 36px;
  font-size: 15px;
  outline: none;
}
.search input:focus {
  border-color: var(--accent);
}
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--sub);
}
.count {
  font-size: 13px;
  color: var(--sub);
  margin-top: 8px;
}
section.series {
  margin: 26px 0;
}
section.series h2 {
  font-size: 17px;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}
section.series h2 small {
  font-size: 12px;
  color: var(--sub);
  font-weight: 400;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
}
.card:hover {
  transform: translateY(-2px);
}
.card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.sw {
  aspect-ratio: 4/3;
  width: 100%;
  background: #ddd center/cover no-repeat;
  position: relative;
}
.sw .tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
}
.card .body {
  padding: 8px 10px 10px;
}
.card .name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.card .code {
  font-size: 11.5px;
  color: var(--sub);
}
.card .meta {
  font-size: 11.5px;
  color: var(--sub);
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  font-size: 11px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
}
.pill.b {
  background: #e7efe9;
}
.pill.a {
  background: #f3e8dc;
}
.pill.n {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--sub);
}
.card.none .sw {
  filter: saturate(0.9);
}
.nodata {
  margin: 18px 0;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--sub);
  font-size: 14px;
  line-height: 1.7;
}
.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--sub);
}
footer {
  color: var(--sub);
  font-size: 12px;
  padding: 30px 0 50px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
/* detail */
.sheet {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 20;
  overflow-y: auto;
  display: none;
  -webkit-overflow-scrolling: touch;
}
.sheet.open {
  display: block;
}
.sheet .bar {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.sheet .bar .wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
}
.back {
  border: 0;
  background: var(--chip);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 14px;
}
.dhead {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0 6px;
}
.dhead .dsw {
  width: 120px;
  flex: 0 0 120px;
  aspect-ratio: 4/3;
  border-radius: 10px;
  background: #ddd center/cover;
  box-shadow: var(--shadow);
}
.dhead h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}
.dhead .s {
  color: var(--sub);
  font-size: 13px;
}
.tabs {
  margin: 14px 0 6px;
}
.house {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 14px 0;
  overflow: hidden;
}
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78%, 1fr);
  gap: 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
@media (min-width: 700px) {
  .strip {
    grid-auto-columns: 1fr;
  }
}
.strip button {
  border: 0;
  padding: 0;
  background: #ddd;
  cursor: zoom-in;
  scroll-snap-align: start;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.combo {
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  font-size: 13px;
}
.combo .ttl {
  grid-column: 1/-1;
  color: var(--sub);
  font-size: 12px;
}
.combo .lbl {
  color: var(--sub);
  white-space: nowrap;
}
.combo .link {
  justify-self: start;
}
.link {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  text-align: left;
  font-size: 13px;
}
.link i {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  background: #ccc center/cover;
  flex: 0 0 22px;
}
.link.cur {
  background: var(--chip);
  cursor: default;
}
/* 🔴 CSP は style 属性を許さない＝HTML の style 属性はここのクラスにする（spec 0134 REQ-02） */
.row2 {
  margin-top: 8px;
}
.role1 {
  margin: 12px 0 0;
  color: var(--sub);
  font-size: 13px;
}
/* 施工例なしの色のページの「同じシリーズで施工例がある色」（REQ-08 B） */
.sibs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 40px;
}
/* メーカー（ケイミュー）の施工事例（spec 0136）：当社の施工例と線で分けて、いちばん下に */
.maker {
  margin: 8px 0 48px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--sub);
}
.maker h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink);
}
.maker p {
  margin: 0 0 10px;
  line-height: 1.7;
}
.mk-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 0;
  text-underline-offset: 3px;
}
.mk-link::after {
  content: " ↗";
}
.maker .mk-note {
  font-size: 12px;
  margin: 2px 0 0;
}
.sibs .nw {
  white-space: nowrap;
}
.sibs .ttl {
  flex: 0 0 100%;
  color: var(--sub);
  font-size: 12px;
}
.note {
  font-size: 12px;
  color: var(--sub);
  margin: 16px 0 40px;
}
/* lightbox */
.lb {
  position: fixed;
  inset: 0;
  background: #111;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
}
.lb.open {
  display: flex;
}
.lb img {
  max-width: 100vw;
  max-height: 88vh;
  object-fit: contain;
  user-select: none;
}
.lb .x,
.lb .nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 22px;
  line-height: 44px;
}
.lb .x {
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
}
.lb .prev {
  left: 10px;
  top: 50%;
}
.lb .next {
  right: 10px;
  top: 50%;
}
.lb .cnt {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  color: #ddd;
  font-size: 13px;
}
