/* The product visual is DOM/CSS layering, with finite input-triggered transitions. */
miru-product-scene {
  display: block;
  position: relative;
  min-width: 0;
  height: 500px;
  isolation: isolate;
}
.liquidity-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.world-grid {
  position: absolute;
  inset: 8% -5% 0;
  background:
    linear-gradient(90deg, #527fa30c 1px, transparent 1px),
    linear-gradient(#527fa30c 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(600px) rotateX(55deg) rotateZ(-25deg);
  mask-image: radial-gradient(ellipse, #000, transparent 72%);
}
.asset-track {
  position: absolute;
  left: 10%;
  top: 44%;
  width: 85%;
  height: 160px;
  border-top: 1px solid #8aaec3;
  border-bottom: 1px solid #8aaec333;
  transform: skewY(-19deg);
}
.asset-track i {
  position: absolute;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #527fa3;
  box-shadow: 0 0 0 5px #b8d8ee55;
}
.asset-track i:nth-child(1) {
  left: 8%;
}
.asset-track i:nth-child(2) {
  left: 47%;
}
.asset-track i:nth-child(3) {
  left: 88%;
}
.liquidity-platform {
  position: absolute;
  width: 70%;
  height: 170px;
  left: 20%;
  top: 41%;
  border-radius: 22px;
  background: linear-gradient(125deg, #edf6fb, #97b4c8 70%, #527fa3);
  transform: perspective(800px) rotateX(58deg) rotateZ(-26deg);
  box-shadow:
    0 7px 0 #5c819d,
    0 14px 0 #b8d8ee,
    12px 32px 45px #172b462b;
  border: 1px solid #ffffff;
  transition: transform 0.7s var(--ease);
}
.platform-back {
  top: 25%;
  left: 26%;
  opacity: 0.45;
  box-shadow: 0 4px 0 #8caabf;
  transform: perspective(800px) rotateX(58deg) rotateZ(-26deg) scale(0.84);
}
.market-window {
  position: absolute;
  left: 30%;
  top: 9%;
  width: 58%;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(125deg, #ffffffed, #edf5fadb);
  border: 1px solid #fff;
  box-shadow:
    0 1px 0 #527fa33b,
    8px 18px 30px #172b461e;
  transform: perspective(1200px) rotateY(-13deg) rotateX(8deg) rotateZ(-7deg);
  z-index: 3;
  backdrop-filter: blur(8px);
}
.window-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #527fa328;
  padding-bottom: 19px;
}
.window-brand img {
  width: 91px;
  height: 23px;
}
.window-brand small {
  font-size: 8px;
  color: #526679;
}
.window-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 25px 0 20px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -1px;
}
.market-arrow {
  font-size: 30px;
  color: #527fa3;
}
.market-channel {
  height: 44px;
  display: flex;
  gap: 8px;
  align-items: end;
  position: relative;
  border-bottom: 1px solid #527fa33b;
  padding: 0 0 9px;
}
.market-channel i {
  display: block;
  flex: 1;
  background: linear-gradient(#7fa5c0, #b8d8ee);
  border-radius: 3px;
  height: 42%;
}
.market-channel i:nth-of-type(2) {
  height: 60%;
}
.market-channel i:nth-of-type(3) {
  height: 75%;
}
.market-channel i:nth-of-type(4) {
  height: 66%;
}
.market-channel i:nth-of-type(5) {
  height: 90%;
}
.channel-fill {
  width: 25%;
  height: 100%;
  background: linear-gradient(120deg, #172b46, #527fa3);
  border-radius: 5px;
}
.window-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-top: 14px;
  gap: 8px;
}
.window-rule {
  font-size: 9px;
  color: #526679;
  margin-top: 23px;
  padding-top: 12px;
  border-top: 1px solid #527fa31c;
}
.asset-tile {
  position: absolute;
  width: 94px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(125deg, #fff, #d6e6f0);
  border: 1px solid #fff;
  border-radius: 18px;
  box-shadow:
    3px 6px 0 #a5bfce,
    10px 22px 25px #172b4620;
  z-index: 4;
  transform: perspective(500px) rotateY(-16deg) rotateZ(-10deg);
}
.asset-tile b {
  font-size: 10px;
}
.asset-tile img {
  object-fit: contain;
}
.tile-eth {
  left: 7%;
  top: 26%;
  transform: perspective(500px) rotateY(-16deg) rotateZ(-10deg) scale(0.85);
  background: linear-gradient(125deg, #eff6fa, #9db8ca);
}
.tile-primary {
  right: 1%;
  top: 62%;
  z-index: 5;
}
.receipt-card {
  position: absolute;
  left: 37%;
  top: 70%;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 22px;
  width: 54%;
  background: linear-gradient(120deg, #172b46, #365a76);
  color: #edf2f7;
  border: 1px solid #b8d8ee66;
  border-radius: 14px;
  box-shadow: 12px 22px 35px #172b4626;
  z-index: 4;
  transform: rotate(-7deg);
}
.receipt-icon {
  font-size: 30px;
  color: #b8d8ee;
}
.receipt-card b,
.receipt-card small {
  display: block;
}
.receipt-card b {
  font-size: 12px;
  font-weight: 500;
}
.receipt-card small {
  font-size: 9px;
  color: #b8d8ee;
  margin-top: 6px;
}
.receipt-card > span:last-child {
  margin-left: auto;
}
.world-caption {
  position: absolute;
  bottom: 3%;
  right: 9%;
  font-size: 8px;
  letter-spacing: 2px;
  color: #527fa3;
}
miru-product-scene miru-operator {
  left: 4%;
  bottom: 7%;
  width: 174px;
  z-index: 8;
}
miru-product-scene[data-state='borrow'] .platform-front {
  transform: perspective(800px) rotateX(58deg) rotateZ(-26deg) translateY(12px);
}
miru-product-scene[data-state='borrow'] .channel-fill {
  background: #b8d8ee;
}
miru-product-scene[data-state='vault'] .platform-back {
  transform: perspective(800px) rotateX(58deg) rotateZ(-26deg) scale(1.04) translateY(-10px);
}
@media (max-width: 760px) {
  miru-product-scene {
    height: 290px;
    width: 100%;
  }
  .market-window {
    padding: 15px;
    top: 5%;
    left: 27%;
    width: 64%;
    border-radius: 13px;
  }
  .window-brand {
    padding-bottom: 12px;
  }
  .window-brand img {
    width: 70px;
    height: 17px;
  }
  .window-brand small {
    font-size: 6px;
  }
  .window-heading {
    font-size: 18px;
    margin: 14px 0 10px;
  }
  .market-arrow {
    font-size: 22px;
  }
  .market-channel {
    height: 32px;
    gap: 5px;
  }
  .window-labels {
    font-size: 8px;
    margin-top: 9px;
  }
  .window-rule {
    font-size: 7px;
    margin-top: 12px;
    padding-top: 9px;
  }
  .liquidity-platform {
    height: 105px;
    top: 41%;
    width: 77%;
    left: 17%;
    border-radius: 13px;
  }
  .platform-back {
    top: 26%;
    left: 21%;
  }
  .asset-tile {
    width: 65px;
    height: 74px;
    border-radius: 13px;
    gap: 4px;
  }
  .asset-tile img {
    max-height: 34px;
    max-width: 33px;
  }
  .asset-tile b {
    font-size: 8px;
  }
  .tile-eth {
    left: 2%;
    top: 25%;
  }
  .tile-primary {
    right: 0;
    top: 63%;
    transform: scale(0.8) rotate(-10deg);
  }
  .receipt-card {
    left: 33%;
    top: 70%;
    width: 60%;
    padding: 12px;
    gap: 9px;
    border-radius: 10px;
  }
  .receipt-card b {
    font-size: 9px;
  }
  .receipt-card small {
    font-size: 7px;
    margin-top: 4px;
  }
  .receipt-icon {
    font-size: 22px;
  }
  .world-caption {
    font-size: 6px;
    letter-spacing: 1px;
    right: 4%;
    bottom: 0;
  }
  miru-product-scene miru-operator {
    width: 116px;
    left: 0;
    bottom: 7%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .liquidity-platform {
    transition: none;
  }
}

.flow-transfer {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #fff;
  background: linear-gradient(120deg, #fff, #d7e9f5);
  display: grid;
  place-items: center;
  box-shadow: 4px 8px 14px #172b4624;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
.flow-transfer img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.flow-transfer img[data-token='USDC'] {
  width: 43px;
  height: 43px;
}
/* The primary coin must not mask the receipt's directional cue. */
.receipt-card > span:last-child {
  position: absolute;
  right: 100px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
}
@media (max-width: 760px) {
  .receipt-card > span:last-child {
    right: 60px;
  }
}
@media (max-width: 760px) {
  .tile-primary img[data-token='USDC'] {
    width: 40px;
    height: 40px;
    max-width: none;
    max-height: none;
  }
}
