:root {
  --paper: #f5f2ed;
  --card: #ffffff;
  --ink: #1c1916;
  --mute: #8a837a;
  --line: rgba(28, 25, 22, .1);
  --accent: #b5532c;
  --shade: rgba(22, 16, 12, .34);
  --wire: rgba(255, 255, 255, .95);
  --fw: min(1080px, calc(100vw - 32px));
  --fh: clamp(200px, min(calc(100vh - 118px), calc((100vw - 32px) * .68)), 700px);
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(8px, 1.8vh, 16px);
  padding: 10px 16px;
}

/* the shop line above the photo */
.bar {
  width: var(--fw);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.brand { font-size: 14px; font-weight: 650; font-stretch: 112%; letter-spacing: -.01em; white-space: nowrap; }
.brand span { font-weight: 400; color: var(--mute); }

.room { font-size: 12px; font-weight: 550; letter-spacing: .02em; white-space: nowrap; }
.room__count { color: var(--mute); font-weight: 450; margin-left: 6px; }

/* the photo frame */
.frame {
  position: relative;
  width: var(--fw);
  height: var(--fh);
  border-radius: 16px;
  overflow: hidden;
  background: #e8e1d7;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgba(28, 25, 22, .55);
  isolation: isolate;
}

.scene { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }

.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }

/* the shade around the open point: a radial hole follows the point */
.dim {
  --mx: 50%;
  --my: 50%;
  position: absolute;
  inset: -2px;
  background: var(--shade);
  opacity: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent 54px, #000 210px);
  mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent 54px, #000 210px);
}

/* the plus points */
.spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  z-index: 2;
  outline: none;
}

.spot__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}

.spot__core {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.spot__plus { display: block; }

.spot:focus-visible .spot__ring { border-color: #fff; box-shadow: 0 0 0 2px var(--ink), 0 2px 12px rgba(0, 0, 0, .16); }

/* the hairline from the point to the card */
.wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.wire path {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
}

/* the product card */
.tag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: min(224px, 64%);
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(28, 25, 22, .06), 0 18px 38px -18px rgba(22, 16, 12, .5), 0 2px 6px rgba(22, 16, 12, .08);
  opacity: 0;
  visibility: hidden;
  will-change: transform;
}

.tag__kind { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.tag__name { margin-top: 5px; font-size: 16px; font-weight: 650; font-stretch: 108%; letter-spacing: -.015em; line-height: 1.15; }
.tag__meta { margin-top: 3px; font-size: 12px; color: var(--mute); line-height: 1.3; }

.tag__foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag__price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tag__view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px 0 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}

.tag__view svg { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }

@media (hover: hover) {
  .tag__view:hover { background: var(--accent); }
  .tag__view:hover svg { transform: translate(1.5px, -1.5px); }
}

.caption { width: var(--fw); font-size: 12px; color: var(--mute); text-align: center; }

/* small frames: a tighter card */
@media (max-width: 520px) {
  :root { --fh: clamp(200px, min(calc(100vh - 118px), calc(100vw - 32px)), 560px); }
  .tag { padding: 10px 10px 9px; border-radius: 12px; width: min(176px, 60%); }
  .tag__name { font-size: 14px; }
  .tag__meta { font-size: 11px; }
  .tag__foot { margin-top: 8px; padding-top: 7px; }
  .tag__price { font-size: 13px; }
  .tag__view { height: 24px; padding: 0 9px 0 10px; font-size: 11px; }
  .spot { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .spot__core { left: 6px; top: 6px; width: 18px; height: 18px; }
}

@media (max-height: 360px) {
  .bar, .caption { display: none; }
}
