.cps-preview {
  box-sizing: border-box;
  container-type: inline-size;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  border: 1px solid #dee4e1;
  border-radius: 1.125rem;
  overflow: hidden;
}

.cps-preview__screen {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  aspect-ratio: 2 / 3;
  padding: 6cqw;
  color: #201b29;
  font-family: inherit;
  line-height: 1.32;
  word-break: keep-all;
}

.cps-preview__screen *,
.cps-preview__screen *::after,
.cps-preview__screen *::before {
  box-sizing: border-box;
}

.cps-preview__mast {
  display: flex;
  align-items: center;
  gap: 2cqw;
  font-size: clamp(.65rem, 4cqw, 1rem);
  font-weight: 740;
}

.cps-preview__title {
  font-size: clamp(1rem, 8cqw, 2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.06em;
}

.cps-preview__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  min-height: 12cqw;
  padding: 2cqw 4.5cqw;
  margin-block-start: auto;
  border-radius: 3cqw;
  background: var(--cps-preview-button);
  color: var(--cps-preview-button-text, #fff);
  font-size: clamp(.68rem, 4.4cqw, 1.13rem);
  line-height: 1.25;
  font-weight: 750;
}

.cps-preview__action span {
  padding-inline-start: 1cqw;
}

.cps-preview__spark {
  line-height: 1;
}

/* The story preview uses a CSS portrait and a moonlit palette. */
.cps-preview__screen--saju-story {
  --cps-preview-button: #f4d696;
  --cps-preview-button-text: #2d2048;
  background: radial-gradient(ellipse at 50% 34%, #4d3d71 0%, #2a2047 51%, #211936 100%);
  color: #fff6e4;
}

.cps-preview__screen--saju-story .cps-preview__mast {
  color: #fae4b0;
}

.cps-preview__portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 76cqw;
  height: 43cqw;
  margin: 6cqw auto 4.5cqw;
}

.cps-preview__portrait::before {
  content: '';
  position: absolute;
  width: 42cqw;
  aspect-ratio: 1;
  border: 1px solid #debc78a3;
  border-radius: 50%;
  background: radial-gradient(circle at 46% 44%, #e6c78d38 0%, #e6c78d15 64%, transparent 65%);
  box-shadow: 0 0 0 2.25cqw #e6c78d1d;
}

.cps-preview__portrait .cps-preview__spark {
  position: absolute;
  color: #f4d696;
  font-size: clamp(.8rem, 6cqw, 1.45rem);
}

.cps-preview__spark--left {
  top: 24%;
  left: 10%;
}

.cps-preview__spark--right {
  right: 9%;
  bottom: 21%;
}

.cps-preview__avatar {
  position: absolute;
  top: 13%;
  width: 29cqw;
  height: 36cqw;
  isolation: isolate;
}

.cps-preview__avatar::before {
  content: '';
  position: absolute;
  inset: 49% 1% 0;
  z-index: -1;
  border-radius: 50% 50% 34% 34%;
  background: linear-gradient(55deg, #583d71 0% 44%, #ecd4aa 45% 52%, #6e5685 53%);
}

.cps-preview__avatar i {
  position: absolute;
  inset: 13% 20% 26%;
  border: .7cqw solid #392944;
  border-radius: 45% 45% 49% 49%;
  background:
    radial-gradient(circle at 32% 47%, #3d2944 0 4%, transparent 5%),
    radial-gradient(circle at 68% 47%, #3d2944 0 4%, transparent 5%),
    radial-gradient(ellipse at 50% 63%, #b97669 0 5%, transparent 6%),
    radial-gradient(ellipse at 51% 94%, #f9e8d5 0 25%, transparent 26%),
    #f0b99e;
}

.cps-preview__avatar b {
  position: absolute;
  inset: 0 1% 67%;
  border-radius: 52% 52% 25% 25%;
  background:
    radial-gradient(circle at 50% 62%, #dbbb7d 0 9%, transparent 10%),
    linear-gradient(180deg, #1c1633 0 72%, #a28257 73% 84%, #1c1633 85%);
}

.cps-preview__story-title {
  text-align: center;
  font-size: clamp(1rem, 8cqw, 2rem);
  font-weight: 780;
  letter-spacing: -.06em;
  line-height: 1.18;
}

.cps-preview__topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2cqw;
  margin: 6cqw 0 4.5cqw;
}

.cps-preview__topics span {
  display: grid;
  justify-items: center;
  gap: .8cqw;
  padding: 2.25cqw 1cqw;
  border: 1px solid #c1a8d960;
  border-radius: 2.5cqw;
  background: #ffffff0e;
  color: #fff6e4;
  font-size: clamp(.59rem, 3.65cqw, .93rem);
  font-weight: 720;
  white-space: nowrap;
}

.cps-preview__topics b {
  color: #f6d894;
  font-size: clamp(.8rem, 6cqw, 1.45rem);
  line-height: 1;
}

/* The birth information screen uses an uninterrupted form column. */
.cps-preview__screen--saju-form {
  --cps-preview-button: #513578;
  background: linear-gradient(180deg, #f3eafe 0%, #fbf8ff 37%, #fcfaff 100%);
}

.cps-preview__screen--saju-form .cps-preview__mast {
  color: #553770;
}

.cps-preview__form-head {
  display: grid;
  justify-items: start;
  gap: 2cqw;
  margin-block: 5cqw 4.5cqw;
}

.cps-preview__form-head > span {
  color: #675b70;
  font-size: clamp(.63rem, 3.9cqw, .99rem);
}

.cps-preview__form-icon {
  display: grid;
  place-items: center;
  width: 11cqw;
  aspect-ratio: 1;
  border-radius: 3.5cqw;
  background: #e6d7f6;
  color: #583680;
  font-size: clamp(.8rem, 6cqw, 1.38rem);
}

.cps-preview__fields {
  display: grid;
  gap: 3cqw;
  margin-block-end: 5cqw;
  color: #443753;
  font-size: clamp(.65rem, 4cqw, 1rem);
  font-weight: 720;
}

.cps-preview__field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  min-height: 11cqw;
  margin-block-start: 1.5cqw;
  padding: 2cqw 3cqw;
  border: 1px solid #e4dce9;
  border-radius: 2.4cqw;
  background: #fff;
  color: #685a71;
  font-size: clamp(.61rem, 3.8cqw, 1rem);
  font-weight: 520;
}

.cps-preview__calendar,
.cps-preview__chevron,
.cps-preview__glass {
  display: inline-block;
  flex: none;
  width: 3.4cqw;
  aspect-ratio: 1;
  border: 1.5px solid currentColor;
}

.cps-preview__calendar {
  border-radius: .45cqw;
  border-top-width: .95cqw;
}

.cps-preview__chevron {
  width: 2.1cqw;
  margin-inline-end: .7cqw;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.cps-preview__toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #e7deef;
  border-radius: 2.5cqw;
  background: #f5eef9;
  padding: .65cqw;
  text-align: center;
}

.cps-preview__toggle > * {
  padding: 1.8cqw 1cqw;
}

.cps-preview__toggle b {
  border-radius: 1.9cqw;
  background: #fff;
  box-shadow: 0 1px 3px #49315d24;
  color: #513578;
}

/* This directory preview emphasizes location search and results. */
.cps-preview__screen--massage-list {
  --cps-preview-button: #17614e;
  padding: 0;
  background: #fbfcfb;
  color: #18382e;
}

.cps-preview__search-hero {
  display: grid;
  gap: 4cqw;
  padding: 6cqw;
  background: radial-gradient(circle at 102% 50%, #ffffff21 0 22%, transparent 22.4%), #17614e;
  color: #fff;
}

.cps-preview__brand-dot {
  width: 3cqw;
  aspect-ratio: 1;
  border: .6cqw solid currentColor;
  border-radius: 50%;
}

.cps-preview__search {
  display: flex;
  align-items: center;
  gap: 2.5cqw;
  min-height: 11cqw;
  padding: 2cqw 3.7cqw;
  border: 1px solid #e2eae6;
  border-radius: 2.8cqw;
  background: #fff;
  color: #466257;
  font-size: clamp(.62rem, 4cqw, 1rem);
  font-weight: 640;
}

.cps-preview__glass {
  position: relative;
  border-radius: 50%;
}

.cps-preview__glass::after {
  content: '';
  position: absolute;
  top: 78%;
  left: 79%;
  width: 1.7cqw;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.cps-preview__filters {
  display: flex;
  align-items: center;
  gap: 4cqw;
  padding: 4cqw 6cqw 3cqw;
  border-bottom: 1px solid #dfeae3;
  color: #436357;
  font-size: clamp(.62rem, 4cqw, 1rem);
  font-weight: 650;
  white-space: nowrap;
}

.cps-preview__filters b {
  padding: 1.4cqw 2.8cqw;
  border-radius: 10cqw;
  background: #ddf0e7;
  color: #1d5745;
}

.cps-preview__list-title {
  padding: 4cqw 6cqw 2cqw;
  font-size: clamp(.76rem, 5cqw, 1.25rem);
  font-weight: 780;
}

.cps-preview__shops {
  display: grid;
  gap: 2.6cqw;
  padding: 0 6cqw 5cqw;
}

.cps-preview__shop {
  display: grid;
  grid-template-columns: 14cqw minmax(0, 1fr) auto;
  align-items: center;
  gap: 3cqw;
  min-height: 17cqw;
  padding: 2cqw;
  border: 1px solid #e2ebe6;
  border-radius: 3cqw;
  background: #fff;
  font-size: clamp(.66rem, 4.2cqw, 1.05rem);
}

.cps-preview__shop small {
  display: block;
  margin-top: .7cqw;
  color: #4f675e;
  font-size: clamp(.55rem, 3.5cqw, .88rem);
}

.cps-preview__shop .cps-preview__chevron {
  transform: rotate(-45deg);
}

.cps-preview__shop-thumb {
  align-self: stretch;
  min-height: 12cqw;
  border-radius: 2cqw;
  background:
    radial-gradient(ellipse at 30% 62%, #edf4e3 0 20%, transparent 22%),
    radial-gradient(ellipse at 55% 65%, #9fb4a5 0 30%, transparent 31%),
    linear-gradient(25deg, #b69279 0 34%, #d5dec6 35%);
}

.cps-preview__shop:nth-child(2) .cps-preview__shop-thumb {
  background:
    radial-gradient(ellipse at 60% 66%, #ab806a 0 20%, transparent 23%),
    radial-gradient(ellipse at 28% 70%, #f5dac0 0 30%, transparent 32%),
    linear-gradient(140deg, #d4e0d7 0 48%, #bd9678 49%);
}

.cps-preview__shop:nth-child(3) .cps-preview__shop-thumb {
  background:
    radial-gradient(ellipse at 67% 56%, #cbd9b5 0 16%, transparent 18%),
    radial-gradient(ellipse at 57% 70%, #7f9b81 0 30%, transparent 31%),
    linear-gradient(19deg, #6f8a75 0 39%, #d4dec0 41%);
}

/* The map is illustrative and has no live map or location dependency. */
.cps-preview__screen--massage-map {
  --cps-preview-button: #125e66;
  padding: 0;
  background: #e8eeea;
  color: #183f42;
}

.cps-preview__map-head {
  display: grid;
  gap: 3cqw;
  padding: 5cqw 5cqw 4cqw;
  background: #fff;
  box-shadow: 0 1px 5px #31585428;
  z-index: 1;
}

.cps-preview__map {
  position: relative;
  flex: 1;
  min-height: 66cqw;
  overflow: hidden;
  background:
    linear-gradient(-23deg, transparent 0 33%, #fff 33.4% 37%, transparent 37.3% 66%, #fff 66.4% 69%, transparent 69.3%),
    linear-gradient(29deg, transparent 0 54%, #fdfdfb 54.5% 57.6%, transparent 58%),
    repeating-linear-gradient(87deg, transparent 0 13%, #fff 13.4% 15.6%, transparent 16% 25%),
    repeating-linear-gradient(181deg, #e5eae6 0 9%, #f8faf5 9.5% 11%, #e8ebe6 12% 23%);
}

.cps-preview__park,
.cps-preview__river,
.cps-preview__map-label,
.cps-preview__pin,
.cps-preview__map-note {
  position: absolute;
}

.cps-preview__park {
  width: 24%;
  height: 25%;
  top: 14%;
  left: 9%;
  border-radius: 24% 33% 43% 20%;
  border: 1px solid #b5d8c7;
  background: #cde7d2;
  transform: rotate(-12deg);
}

.cps-preview__river {
  width: 42%;
  height: 32%;
  right: -22%;
  bottom: -2%;
  border: 1px solid #b0d4df;
  border-radius: 38% 0 0 45%;
  background: #c4e2eb;
  transform: rotate(16deg);
}

.cps-preview__map-label,
.cps-preview__map-note {
  font-size: clamp(.55rem, 3.25cqw, .8rem);
  font-weight: 700;
  white-space: nowrap;
}

.cps-preview__map-label {
  color: #3c615a;
}

.cps-preview__map-label--park {
  top: 23%;
  left: 12%;
}

.cps-preview__map-label--subway {
  bottom: 27%;
  left: 38%;
}

.cps-preview__map-note {
  right: 4%;
  bottom: 5%;
  padding: 1.25cqw 1.7cqw;
  border-radius: 2cqw;
  background: #fff;
  color: #335752;
}

.cps-preview__pin {
  width: 7.2cqw;
  aspect-ratio: 1;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 10%;
  background: #1c7a71;
  box-shadow: 0 1px 4px #17473c56;
  transform: rotate(-45deg);
}

.cps-preview__pin::after {
  content: '';
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background: #fff;
}

.cps-preview__pin--west { top: 56%; left: 20%; }
.cps-preview__pin--north { top: 20%; left: 55%; }
.cps-preview__pin--east { top: 45%; left: 76%; }

.cps-preview__pin--selected {
  top: 40%;
  left: 46%;
  width: 10cqw;
  background: #e87948;
  z-index: 1;
}

.cps-preview__map-card {
  display: grid;
  gap: 3cqw;
  padding: 4.4cqw 5cqw 5cqw;
  margin: -1cqw 3.7cqw 4cqw;
  border: 1px solid #d6e4de;
  border-radius: 3.5cqw;
  background: #fff;
  box-shadow: 0 1px 9px #22554d21;
  z-index: 1;
}

.cps-preview__map-card b {
  display: block;
  margin-bottom: .65cqw;
  font-size: clamp(.79rem, 5.3cqw, 1.35rem);
}

.cps-preview__map-card > div > span {
  color: #506c65;
  font-size: clamp(.57rem, 3.6cqw, .91rem);
}

.cps-preview__map-card .cps-preview__action > span {
  color: #fff;
}
