@charset "UTF-8";

/* ==========================================================================
   diag.css — makes the Yes / No buttons in Block 09 (skin self-check) work.
   The artwork is a baked image, so the buttons are transparent HTML buttons
   laid over it. Only once all three questions are answered does the result
   part (from the pink-bordered "そんな理想を持つ方に…" box down) open.
   Coordinates are natural pixels of the 750x2386 block image.
   ========================================================================== */

.diag__clip { position: relative; }

.diag__stage {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 750 / 2386;
}

.diag__stage > .block__image { display: block; width: 100%; height: auto; }

/* Collapse only once the script has armed the block, so without JS the
   whole image (the original artwork) simply shows. */
.is-armed .diag__clip { overflow: hidden; }
.is-armed.is-done .diag__clip { transition: height .8s cubic-bezier(.16, .84, .24, 1); }

.diag__row { display: contents; }

.diag__btn {
  position: absolute;
  left: calc(var(--x) / 750 * 100%);
  top: calc(var(--y) / 2386 * 100%);
  width: calc(var(--w) / 750 * 100%);
  height: calc(var(--h) / 2386 * 100%);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  font-weight: 700;
  font-size: 6.6cqw;
  letter-spacing: .14em;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, box-shadow .25s ease, transform .15s ease;
}

.diag__btn > span {
  display: block;
  opacity: 0;
  transform: scale(.88);
  transition: opacity .2s ease, transform .3s cubic-bezier(.16, .84, .24, 1);
}

@media (hover: hover) {
  .diag__btn:hover { background: rgba(255, 228, 242, .38); }
}

.diag__btn:active { transform: scale(.975); }

.diag__btn:focus-visible { outline: 3px solid #e2338a; outline-offset: 3px; }

/* selected */
.diag__btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #f27bb0 0%, #e2338a 55%, #d10f78 100%);
  box-shadow: 0 4px 12px rgba(209, 15, 120, .32), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.diag__btn[data-a="no"][aria-pressed="true"] {
  background: linear-gradient(180deg, #ab7a93 0%, #86536c 55%, #6c3f57 100%);
  box-shadow: 0 4px 12px rgba(108, 63, 87, .30), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.diag__btn[aria-pressed="true"] > span { opacity: 1; transform: none; }

/* the one not chosen steps back */
.diag__row[data-picked="yes"] .diag__btn[data-a="no"],
.diag__row[data-picked="no"] .diag__btn[data-a="yes"] {
  background: rgba(255, 255, 255, .62);
}

/* All three answered "No": the result heading switches to
   「特にお悩みがない方にも、／おすすめしたいケアがあります」
   (an image of the re-set heading laid over the original lines). */
.diag__allno {
  position: absolute;
  left: calc(var(--x) / 750 * 100%);
  top: calc(var(--y) / 2386 * 100%);
  width: calc(var(--w) / 750 * 100%);
  height: auto;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

.is-all-no .diag__allno { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .is-armed.is-done .diag__clip,
  .diag__btn,
  .diag__btn > span,
  .diag__allno { transition: none; }
}
