
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #17202b;
  --body: #3b4654;
  --muted: #8490a0;
  --line: #e9edf2;
  --accent: #1f4d45;
  --accent-hover: #163832;
  --price: #e23b12;
  --chip: #f2f4f7;
  --radius: 12px;
  --demo: #7a3d12;
  --demo-bg: #f8eee4;
  --demo-line: #e8d0b8;
  --warn-line: #ead7b2;
  --warn-ink: #6a4712;
  --bg-soft: #fbf6ea;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
.wrap { width: min(1600px, calc(100% - 32px)); margin: 0 auto; }
.narrow, article.prose { max-width: 42rem; }
.topbar {
  background: var(--accent);
  color: #f6f3ec;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 16px;
  font-weight: 550;
}
header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 650;
}
.brand:hover { color: var(--ink); }
.logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: #f6f3ec;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
nav.links { display: flex; gap: 6px; flex-wrap: wrap; }
nav.links a {
  color: var(--body); text-decoration: none;
  padding: 6px 10px; border-radius: 999px; font-size: 14px;
}
nav.links a:hover, nav.links a[aria-current="page"] { background: var(--chip); color: var(--ink); }
.demo-banner {
  background: var(--demo-bg);
  border-bottom: 1px solid var(--demo-line);
  color: var(--demo);
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
}
main { flex: 1; padding: 28px 0 64px; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; margin: 0; }
h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
.heading { margin-bottom: 18px; }
.heading p { margin: 8px 0 0; font-size: 14px; color: var(--muted); max-width: 52rem; }
.kicker { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin: 0 0 8px; }
.muted { color: var(--muted); }
.badge {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 8px; font-size: 12px; color: var(--muted); background: #fff;
}

/* category chips */
.cat-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  overflow-x: auto;
}
.cat-bar a {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0; min-height: 40px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid transparent;
  background: var(--chip); color: var(--body);
  text-decoration: none; font-size: 14px; font-weight: 550;
}
.cat-bar a:hover, .cat-bar a:focus { color: var(--accent); background: #e8f0ee; }
.cat-bar img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }

/* category shelves + dense tiles */
.shelf {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 20px;
  margin-bottom: 18px;
}
.shelf-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.shelf-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 650; color: var(--ink); }
.shelf-title img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; background: #fff; }
.shelf-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 14px;
}
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

a.tile {
  min-width: 0;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .18s, transform .18s;
}
a.tile:hover { box-shadow: 0 8px 24px rgba(23,32,43,0.08); transform: translateY(-2px); color: inherit; }
.tile-image {
  position: relative; width: 100%; aspect-ratio: 1;
  display: grid; place-items: center;
  background: #f8f9fa;
}
.tile-image img { width: 100%; height: 100%; object-fit: contain; }
.tile-body { min-width: 0; padding: 10px 10px 12px; display: flex; flex-direction: column; flex: 1; }
.tile-title {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3em;
}
.tile-bottom { margin-top: auto; padding-top: 14px; }
.price {
  color: var(--price);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price.lg { font-size: 32px; }
.yen { font-size: 0.58em; margin-right: 1px; font-weight: 650; }

.grid { display: grid; gap: 14px; }
.steps { grid-template-columns: repeat(4, 1fr); margin: 8px 0 28px; }
.step, .card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step { padding: 14px 16px; }
.step .n { color: var(--accent); font-size: 12px; margin: 0; }
.step p { margin: 8px 0 0; font-size: 14px; }
.two { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.panel { padding: 18px 20px; }
.panel ul, .caveats ol, .warranty ul { margin: 10px 0 0; padding-left: 1.2em; }
.panel li, .caveats li, .warranty li { margin: 6px 0; font-size: 14px; }
.caveats {
  background: var(--bg-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.caveats h2 { color: var(--warn-ink); font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.layout { display: grid; gap: 24px; grid-template-columns: 1fr 300px; align-items: start; }
aside.summary { padding: 0; overflow: hidden; position: sticky; top: 88px; }
aside.summary .tile-image, aside.summary .cover { aspect-ratio: 1; background: #f8f9fa; }
aside.summary .inner { padding: 16px 18px 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: #f6f3ec; min-height: 42px;
}
.btn:hover { background: var(--accent-hover); color: #f6f3ec; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--chip); color: var(--ink); }
form.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 550; color: var(--ink); }
input, textarea {
  font: inherit; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, textarea:focus { outline: 2px solid rgba(31, 77, 69, 0.25); border-color: var(--accent); }
.note, .flash { border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.note { background: var(--demo-bg); border: 1px dashed var(--demo-line); color: var(--demo); }
.flash.ok { background: #eef6f3; border: 1px solid #cfe3db; color: #1f4d45; }
.flash.bad { background: var(--demo-bg); border: 1px solid var(--demo-line); color: var(--demo); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
article.prose h2 { margin: 28px 0 8px; font-size: 17px; }
article.prose p { margin: 8px 0; font-size: 14px; }
.product-hero {
  display: grid; gap: 28px;
  grid-template-columns: minmax(0, 420px) 1fr;
  align-items: start; margin-bottom: 28px;
}
.product-hero .cover {
  border-radius: 16px; border: 1px solid var(--line);
  overflow: hidden; background: #fff; aspect-ratio: 1;
}
.product-hero .cover img { width: 100%; height: 100%; object-fit: contain; }
.cdk-box {
  background: #fff; border: 1px dashed var(--line); border-radius: 12px;
  padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
footer.site { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 13px; background: #fff; }
.foot { display: grid; gap: 18px; grid-template-columns: 2fr 1fr 1fr; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot h3 { font-size: 13px; margin-bottom: 8px; color: var(--body); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.warn-strong { font-weight: 650; color: var(--accent); }
@media (max-width: 800px) {
  .steps, .two, .layout, .foot, .product-hero { grid-template-columns: 1fr; }
  aside.summary { position: static; }
  main { padding: 20px 0 48px; }
  .shelf { padding: 12px; }
  .tile-title { font-size: 13px; }
  .price { font-size: 22px; }
  nav.links a { padding: 6px 8px; font-size: 13px; }
}
