:root {
  --fg: #000;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --tile: #f1f1f1;
  --bg: #fff;
  --gutter: 16px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { display: block; width: 100%; height: auto; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }

/* header */
.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; padding: 14px var(--gutter);
}
.mark { font-weight: 700; letter-spacing: -0.01em; }
.nav { display: flex; gap: 18px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 2px; }

.preview-note {
  padding: 8px var(--gutter); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.preview-note a { text-decoration: underline; }

/* shop controls */
.controls {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 10px 24px; padding: 10px var(--gutter) 14px;
}
.cats { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cats button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); }
.cats button[aria-pressed="true"] { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.cats button:hover { color: var(--fg); }
.selects { display: flex; gap: 16px; align-items: baseline; }
.selects label { color: var(--muted); }
.selects select {
  border: 0; border-bottom: 1px solid var(--fg); background: none; padding: 0 2px 1px; border-radius: 0;
  width: auto; max-width: 40vw; cursor: pointer;
}
.count { color: var(--muted); }

/* grid */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 28px 4px; padding: 0 4px 48px;
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1600px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.tile { display: block; }
.tile:hover { text-decoration: none; }
.ph { position: relative; aspect-ratio: 3 / 4; background: var(--tile); overflow: hidden; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .alt { opacity: 0; }
@media (hover: hover) { .tile:hover .ph .alt { opacity: 1; } }
.ph .noimg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #b5b5b5; font-size: 11px;
}
.cap { display: grid; padding: 8px 4px 0; gap: 1px; }
.cap .t { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap .m { color: var(--muted); }
.tile:hover .cap .b { text-decoration: underline; text-underline-offset: 2px; }
.empty { padding: 40px var(--gutter); color: var(--muted); }

/* piece page */
.back { display: inline-block; padding: 0 var(--gutter) 12px; color: var(--muted); }
.piece { display: block; padding-bottom: 56px; }
.gallery {
  display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 0 4px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 88%; scroll-snap-align: start; background: var(--tile); aspect-ratio: 3 / 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.info { padding: 20px var(--gutter) 0; max-width: 520px; }
.info h1 { font-size: 13px; font-weight: 700; }
.info .title { font-size: 13px; font-weight: 400; }
.info .price { margin-top: 10px; }
.buy {
  display: block; width: 100%; margin-top: 18px; padding: 14px 16px;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg);
  text-align: center; cursor: pointer;
}
.buy:hover { background: var(--bg); color: var(--fg); text-decoration: none; }
.buy[aria-disabled="true"] { background: var(--bg); color: var(--muted); border-color: var(--line); cursor: default; }
.specs { margin-top: 24px; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.notes { margin-top: 16px; }
.fine { margin-top: 20px; color: var(--muted); font-size: 12px; }
.fine a { text-decoration: underline; }
.sample { color: var(--muted); font-size: 11px; }

@media (min-width: 900px) {
  .piece { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-right: var(--gutter); }
  .gallery { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; padding: 0 0 0 4px; }
  .gallery figure { flex: none; }
  .info { position: sticky; top: 16px; padding: 0; }
}

.buybox { margin-top: 18px; }
.ship { border: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; }
.ship legend { float: left; color: var(--muted); margin-right: 18px; }
.ship label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.ship input { accent-color: var(--fg); margin: 0; }
.buybox .buy { margin-top: 12px; }
button.buy:disabled:not([aria-disabled="true"]) { opacity: 0.6; cursor: progress; }
.msg { margin-top: 8px; color: var(--muted); }
.msg:empty { display: none; }
.tile.gone .ph { opacity: 0.45; }

/* plain text pages */
.page { padding: 8px var(--gutter) 56px; max-width: 560px; }
.page h1, .page h2 { font-size: 13px; font-weight: 700; margin: 28px 0 6px; }
.page > :first-child { margin-top: 0; }
.page p { margin-bottom: 10px; }
.page a { text-decoration: underline; text-underline-offset: 2px; }
.page a.inq { color: var(--muted); }
.page a.inq:hover { color: var(--fg); }

/* inquiry form */
.inquiry { display: grid; gap: 14px; margin-top: 10px; }
.inquiry label { display: grid; gap: 4px; color: var(--muted); }
.inquiry input, .inquiry select, .inquiry textarea {
  color: var(--fg); background: none; border: 0; border-bottom: 1px solid var(--fg); border-radius: 0;
  padding: 6px 0; width: 100%;
}
.inquiry textarea { border: 1px solid var(--fg); padding: 8px; resize: vertical; }
.inquiry .buy { margin-top: 6px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* brands */
.brands { columns: 2; column-gap: 24px; padding: 8px var(--gutter) 56px; }
@media (min-width: 700px) { .brands { columns: 3; } }
@media (min-width: 1100px) { .brands { columns: 5; } }
.brands section { break-inside: avoid; margin-bottom: 20px; }
.brands h2 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.brands ul { list-style: none; }
.brands li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.brands li span { color: var(--muted); }

/* footer */
.foot {
  display: grid; gap: 20px; padding: 24px var(--gutter) 28px;
  border-top: 1px solid var(--line); color: var(--muted);
}
@media (min-width: 700px) { .foot { grid-template-columns: 1fr auto; align-items: end; } }
.signup { display: flex; gap: 8px; max-width: 360px; }
.signup input {
  flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--fg); padding: 4px 0; border-radius: 0; background: none;
}
.signup button { border: 0; background: none; padding: 4px 0; cursor: pointer; color: var(--fg); }
.signup button:hover { text-decoration: underline; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.links a:hover { color: var(--fg); }
