:root {
  --ink: #171717;
  --muted: #666;
  --paper: #f4f1eb;
  --card: #fff;
  --line: #d9d4ca;
  --accent: #8a351f;
  --green: #146c43;
  font-family: system-ui, -apple-system, "Noto Sans JP", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: var(--accent); text-underline-offset: 3px; }
.shell { width: min(1180px, calc(100% - 32px)); margin: auto; }
.hero { padding: 64px 0; background: linear-gradient(125deg, #181512, #513324); color: #fff; }
.hero.wholesale { background: linear-gradient(125deg, #101a18, #174d3a); }
.eyebrow { margin: 0; letter-spacing: .16em; font-size: .78rem; font-weight: 800; opacity: .75; }
.hero h1 { margin: .15em 0; font-size: clamp(2.2rem, 7vw, 5rem); }
.hero p:last-child { max-width: 720px; color: #eee; }
.notice { margin: 12px 0 26px; padding: 18px 20px; border-left: 5px solid var(--accent); border-radius: 10px; background: #fff; }
.notice p { margin: 7px 0 0; color: var(--muted); line-height: 1.7; }
.notice a { font-weight: 800; }

.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(140px, .7fr); gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.filters label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.filters input,
.filters select,
.result-bar select { width: 100%; min-width: 0; min-height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.filters input:focus-visible,
.filters select:focus-visible,
.result-bar select:focus-visible,
.actions button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.filters button { align-self: end; min-height: 44px; border: 0; border-radius: 10px; background: #222; color: #fff; font-weight: 800; cursor: pointer; }
.wide { grid-column: span 2; }
.category-shortcuts { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.category-shortcuts-title { margin: 0 0 11px; color: var(--muted); font-size: .82rem; font-weight: 900; }
.category-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.category-button { max-width: 100%; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .82rem; font-weight: 800; line-height: 1.25; cursor: pointer; }
.category-button:hover { border-color: var(--accent); color: var(--accent); }
.category-button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.category-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin: 25px 2px 14px; }
.result-bar p { color: var(--muted); }
.result-bar strong { color: var(--ink); font-size: 1.35rem; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 18px; padding-bottom: 52px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #e4dfd6; border-radius: 18px; background: var(--card); box-shadow: 0 7px 25px rgba(0, 0, 0, .055); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 0, 0, .09); }
.visual { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-bottom: 1px solid #eee9e0; background: #fff; }
.visual img { grid-area: 1 / 1; place-self: center; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; padding: 0; object-fit: contain; object-position: 50% 50%; }
.placeholder { display: grid; place-items: center; width: 100%; height: 100%; padding: 28px; color: var(--muted); font-size: .9rem; font-weight: 800; opacity: .65; }
.placeholder[hidden] { display: none !important; }
.badge { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 6px 9px; border: 1px solid rgba(0, 0, 0, .06); border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); font-size: .7rem; font-weight: 900; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.code { margin: 0 0 5px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.card h2 { min-height: 3.05em; margin: 0 0 13px; font-size: 1.08rem; line-height: 1.5; }
.card-description { display: -webkit-box; min-height: 8em; margin: 0 0 14px; overflow: hidden; color: var(--muted); font-size: .82rem; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.tags { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
.tags { min-height: 62px; margin-top: 8px; }
.tag { padding: 5px 8px; border-radius: 999px; background: #f0ede7; font-size: .72rem; line-height: 1.25; }
.price { margin: 18px 0 4px; font-weight: 900; }
.price-kicker { display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.price small { color: var(--muted); font-size: .68rem; font-weight: 700; }
.blank-price { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; margin-bottom: 10px; padding: 10px 11px; border: 1px solid #b9d8c2; border-radius: 10px; background: #f1faf3; }
.blank-price span { color: #356b43; font-size: .72rem; font-weight: 900; }
.blank-price strong { color: #164d28; font-size: 1.18rem; white-space: nowrap; }
.blank-price small { grid-column: 1 / -1; }
.price-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.price-options.single { grid-template-columns: 1fr; }
.price-option { min-width: 0; padding: 8px 9px; border: 1px solid #ded9d0; border-radius: 9px; background: #faf8f4; }
.price-option span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.price-option strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.2; white-space: nowrap; }
.service-option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; margin-top: 7px; padding: 8px 9px; border: 1px solid #d8c6a4; border-radius: 9px; background: #fffaf0; }
.service-option span { color: #6e5425; font-size: .72rem; font-weight: 900; }
.service-option strong { color: #5b3f0d; font-size: 1rem; white-space: nowrap; }
.service-option small { grid-column: 1 / -1; }
.subprice { min-height: 2.7em; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; padding-top: 16px; }
.actions button { display: grid; place-items: center; min-height: 44px; padding: 10px; border-radius: 9px; text-align: center; font-size: .82rem; font-weight: 800; }
.actions button { border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.empty { padding: 40px; border-radius: 16px; background: #fff; text-align: center; }

.faq { margin: 10px 0 60px; }
.faq details { margin: 8px 0; padding: 14px 16px; border-radius: 10px; background: #fff; }
.faq summary { font-weight: 800; cursor: pointer; }
dialog { width: min(820px, calc(100% - 26px)); max-height: min(88vh, 900px); padding: 0; overflow: auto; border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .58); }
.close { position: sticky; z-index: 2; float: right; top: 8px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); font-size: 2rem; line-height: 1; cursor: pointer; }
.detail-inner { padding: 12px 32px 34px; }
.detail-inner h2 { padding-right: 42px; }
.detail-inner table { width: 100%; border-collapse: collapse; }
.detail-inner th,
.detail-inner td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.55; }
.detail-inner th { width: 31%; color: var(--muted); font-size: .8rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.detail-actions a { padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-decoration: none; font-size: .84rem; font-weight: 800; }
.detail-actions a.primary { border-color: #222; background: #222; color: #fff; }
footer { padding: 28px 0; background: #222; color: #ddd; font-size: .82rem; }

@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visual img { padding: 0; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 22px, 1180px); }
  .hero { padding: 46px 0; }
  .filters { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .category-shortcuts { padding: 14px; }
  .category-buttons { gap: 7px; }
  .category-button { min-height: 42px; padding: 8px 12px; font-size: .78rem; }
  .grid { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .card { align-self: start; }
  .card-body { flex: none; padding: 16px; }
  .visual { width: 100%; aspect-ratio: 1 / 1; }
  .visual img { width: 100%; height: 100%; padding: 0; object-position: 50% 50%; }
  .card h2 { min-height: auto; }
  .card-description { display: block; min-height: auto; overflow: visible; -webkit-line-clamp: unset; }
  .tags,
  .subprice { min-height: auto; }
  .tags:empty { display: none; margin: 0; }
  .price { margin-top: 10px; }
  .actions { grid-template-columns: 1fr; margin-top: 0; padding-top: 12px; }
  .result-bar { align-items: flex-start; gap: 12px; }
  .result-bar select { max-width: 55%; }
  .detail-inner { padding: 8px 18px 24px; }
  .detail-inner th { width: 38%; }
  .detail-actions { display: grid; }
}

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

.load-more { display: block; margin: 28px auto 12px; min-width: 240px; padding: 14px 24px; border: 1px solid #161616; border-radius: 999px; background: #fff; color: #161616; font-weight: 800; cursor: pointer; }
.load-more:hover { background: #161616; color: #fff; }
