:root {
  color-scheme: dark;
  --ink: #141513;
  --cream: #f5efd8;
  --muted: #b5b3a7;
  --accent: #efdfa1;
  --line: #3e4038;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
select {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 12px 20px;
  border-radius: 28px;
  min-height: 46px;
}
button:hover,
a:hover {
  filter: brightness(1.12);
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b6c9b9;
  outline-offset: 3px;
}
.primary,
.chip.active {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.quiet {
  font-size: 13px;
}
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4vw;
  background: #141513f5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.logo {
  font-size: 30px;
  letter-spacing: 3px;
  font-weight: 750;
}
.logo span {
  display: block;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 400;
  margin-top: 3px;
}
nav {
  display: flex;
  gap: 8px;
}
nav a {
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 24px;
}
nav a.active {
  background: var(--cream);
  color: var(--ink);
}
main {
  max-width: 1720px;
  margin: auto;
  padding: 32px 4vw 64px;
}
.eyebrow {
  color: var(--muted);
  letter-spacing: 3px;
  font-size: 11px;
}
h1 {
  font-size: clamp(30px, 3.7vw, 54px);
  font-weight: 500;
  letter-spacing: -1px;
  margin: 12px 0 14px;
}
h2 {
  font-size: 24px;
  font-weight: 500;
}
p {
  line-height: 1.75;
}
.muted {
  color: var(--muted);
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}
.search {
  display: flex;
  gap: 8px;
  min-width: 310px;
  max-width: 560px;
  width: 45%;
}
.search input {
  min-width: 0;
  flex: 1;
  background: #252621;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 15px 20px;
}
.layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 30px;
}
.filters {
  position: sticky;
  top: 120px;
  align-self: start;
  max-height: calc(100dvh - 144px);
  overflow: auto;
  padding: 22px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 24px;
}
.filters label {
  display: block;
  font-size: 12px;
  margin-bottom: 20px;
  color: #67624f;
}
.filters select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 10px;
  background: #e9e1c3;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  min-height: 46px;
}
.filters button {
  border-color: #b7ae8c;
  color: var(--ink);
  width: 100%;
}
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
}
.card:nth-child(4n + 2) {
  background: #e0e5d4;
}
.card:nth-child(4n + 3) {
  background: #e8d6c6;
}
.cover {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #33372f;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-copy {
  padding: 18px 18px 22px;
}
.card-copy h2 {
  font-size: 19px;
  margin: 8px 0;
}
.card-copy small {
  font-size: 11px;
  opacity: 0.66;
}
.sku {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.card-copy p {
  font-size: 12px;
  opacity: 0.7;
  margin: 8px 0 0;
}
.save {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #141513cc;
  color: white;
  font-size: 22px;
}
.save.selected {
  background: var(--accent);
  color: var(--ink);
}
.empty {
  padding: 70px 20px;
  text-align: center;
  background: #22241f;
  border-radius: 22px;
}
.load {
  display: block;
  margin: 28px auto;
}
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 40px;
  margin-top: 24px;
}
.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
  border-radius: 24px;
  background: #252821;
  cursor: zoom-in;
}
.thumbs {
  display: flex;
  gap: 12px;
  margin: 14px 0;
  overflow: auto;
}
.thumbs button {
  padding: 0;
  flex: 0 0 86px;
  border-radius: 12px;
  overflow: hidden;
}
.thumbs img {
  width: 86px;
  height: 72px;
  display: block;
  object-fit: cover;
}
.detail-info {
  align-self: start;
  position: sticky;
  top: 124px;
}
.path {
  font-size: 12px;
  color: var(--accent);
}
.detail-info h1 {
  font-size: 38px;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.tag {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12px;
}
.attributes {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 16px;
  font-size: 14px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.attributes dt {
  color: var(--muted);
}
.attributes dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.long-image {
  width: 100%;
  display: block;
  border-radius: 16px;
  margin-top: 24px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.store {
  background: var(--cream);
  color: var(--ink);
  border-radius: 28px;
  padding: 34px;
}
.store p {
  color: #6a6654;
}
.store a {
  display: inline-block;
  margin-top: 16px;
  font-size: 22px;
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
}
.canvas-wrap {
  background: var(--cream);
  border-radius: 26px;
  overflow: hidden;
  align-self: start;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
}
.canvas-wrap p {
  color: #686455;
  text-align: center;
  font-size: 12px;
  margin: 0;
  padding: 12px;
}
.studio-controls {
  background: #23261f;
  border-radius: 24px;
  padding: 24px;
}
.studio-controls label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 8px;
}
.studio-controls select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #34382f;
  color: var(--cream);
  border: 1px solid var(--line);
}
.studio-controls .actions {
  margin: 10px 0;
}
.studio-controls .chip {
  font-size: 13px;
  padding: 10px 13px;
}
.studio-controls hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
#notice {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cream);
  color: var(--ink);
  padding: 14px 24px;
  border-radius: 20px;
  z-index: 100;
  max-width: 90vw;
  display: none;
}
#notice.show {
  display: block;
}
dialog {
  border: 0;
  background: #10110ff5;
  color: white;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 50px 70px;
}
dialog::backdrop {
  background: #10110f;
}
dialog img {
  width: 100%;
  height: calc(100% - 32px);
  object-fit: contain;
}
dialog [data-close] {
  position: absolute;
  right: 20px;
  top: 14px;
}
dialog [data-prev] {
  position: absolute;
  left: 10px;
  top: 50%;
}
dialog [data-next] {
  position: absolute;
  right: 10px;
  top: 50%;
}
dialog span {
  display: block;
  text-align: center;
  font-size: 12px;
}
@media (min-width: 1450px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .masthead {
    gap: 14px;
    padding: 15px 3vw;
  }
  .logo {
    font-size: 24px;
  }
  nav a {
    padding: 10px;
    font-size: 13px;
  }
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
  }
  .filters {
    padding: 17px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 18px;
  }
  .detail {
    gap: 24px;
  }
  .quiet {
    display: none;
  }
}
@media (max-width: 720px) {
  .masthead {
    flex-wrap: wrap;
  }
  .logo span {
    display: none;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    order: 2;
  }
  main {
    padding: 24px 18px 44px;
  }
  .intro {
    display: block;
  }
  .search {
    width: 100%;
    min-width: 0;
    margin-top: 20px;
  }
  .layout {
    display: block;
  }
  .filters {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .filters label {
    margin: 0;
  }
  .filters button {
    align-self: end;
  }
  .result-head {
    margin-top: 20px;
  }
  .grid {
    gap: 12px;
  }
  .card {
    border-radius: 16px;
  }
  .card-copy {
    padding: 14px;
  }
  .card-copy h2 {
    font-size: 17px;
  }
  .detail,
  .studio-grid,
  .store-grid {
    grid-template-columns: 1fr;
  }
  .detail-info {
    position: static;
  }
  .hero-image {
    aspect-ratio: 1;
  }
  .studio-controls {
    padding: 20px;
  }
  dialog {
    padding: 70px 45px;
  }
  .store {
    padding: 26px;
  }
  h1 {
    font-size: 34px;
  }
}

/* A calm showroom surface, with the whole composition visible on a Pad. */
body { -webkit-font-smoothing: antialiased; }
.masthead { box-shadow: 0 8px 30px #00000015; }
nav a, button, .card { transition: background 160ms, color 160ms, border-color 160ms, box-shadow 160ms, transform 160ms; }
button:active:not(:disabled) { transform: scale(.98); }
.card { border: 1px solid #ffffff12; }
.card-copy h2 { font-weight: 550; line-height: 1.5; }
.cover img { transition: transform 320ms ease; }
.filters { border: 1px solid #fff9d42e; box-shadow: 0 12px 35px #00000018; }
.filters select { background: #e9e1c34d; border: 1px solid #cfc7ad; }
.result-head { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.detail-info { padding: 26px; background: #21231d; border: 1px solid var(--line); border-radius: 24px; }
.detail-info h1 { font-size: clamp(28px,2.8vw,40px); line-height: 1.35; overflow-wrap: anywhere; }
.studio-controls { border: 1px solid var(--line); padding: 22px; }
.studio-controls > label:first-child { margin-top: 0; }
.studio-controls > .primary { width: 100%; }
.studio-controls .texture-note { margin: 7px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.studio-controls #material-label { background: #32382c; border-radius: 10px; padding: 12px; line-height: 1.65; min-height: 44px; }
.canvas-wrap { position: relative; background: #f7f4eb; border: 1px solid #fff8df2b; }
.canvas-wrap canvas { margin: auto; }
.studio-render-status { position: absolute; z-index: 2; top: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 16px; border-radius: 16px; background: #283c30eb; color: #fff9e9; font-size: 12px; box-shadow: 0 4px 20px #0002; }
.studio-render-status[hidden] { display: none; }
.studio-render-status button { padding: 4px 12px; min-height: 36px; border-color: #9eae9c; }
@media (min-width: 721px) {
  .studio-grid .canvas-wrap { position: sticky; top: 110px; }
  .canvas-wrap canvas { width: auto; max-width: 100%; max-height: max(360px,calc(100dvh - 340px)); }
  .studio-grid { align-items: start; }
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px #0003; }
  .card:hover .cover img { transform: scale(1.025); }
}
@media (max-width: 720px) {
  .detail-info { padding: 22px; }
  .card-copy h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
