  .flip-clock {
    text-align: center;
    perspective: 400px;
    margin: 0 auto;
  }
  
  .flip-clock__piece {
    display: inline-block;
    margin: 0 3px;
  }
  
  .flip-clock__slot {
    font-size: 10px;
    margin-top: 2px;
    display: block;
    color: #666;
  }
  
  /* Core size constants */
  .card {
    display: block;
    position: relative;
    padding-bottom: 0.36em; /* was 0.72em */
    font-size: 28px; /* was 9vw – use px for stable sizing */
    line-height: 0.95;
    width: 1.4em;
  }
  
  .card__top,
  .card__bottom,
  .card__back::before,
  .card__back::after {
    display: block;
    height: 0.36em; /* half of card height */
    color: #ccc;
    background: #222;
    padding: 0.1em 0.1em;
    border-radius: 0.1em 0.1em 0 0;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transform: translateZ(0);
    width: 1.4em;
  }
  
  .card__bottom {
    color: #fff;
    position: absolute;
    top: 50%;
    left: 0;
    border-top: solid 1px #000;
    background: #393939;
    border-radius: 0 0 0.1em 0.1em;
    pointer-events: none;
    overflow: hidden;
  }
  
  .card__bottom::after {
    content: attr(data-value);
    display: block;
    margin-top: -0.36em;
  }
  
  .card__back {
    position: absolute;
    top: 0;
    height: 100%;
    left: 0%;
    pointer-events: none;
  }
  
  .card__back::before {
    content: attr(data-value);
    position: relative;
    z-index: -1;
    overflow: hidden;
  }
  
  /* Flip animations */
  .flip .card__back::before {
    animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
    animation-fill-mode: both;
    transform-origin: center bottom;
  }
  
  .flip .card__back .card__bottom {
    transform-origin: center top;
    animation-fill-mode: both;
    animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
  }
  
  @keyframes flipTop {
    0% {
      transform: rotateX(0deg);
      z-index: 2;
    }
    0%, 99% {
      opacity: 0.99;
    }
    100% {
      transform: rotateX(-90deg);
      opacity: 0;
    }
  }
  
  @keyframes flipBottom {
    0%, 50% {
      z-index: -1;
      transform: rotateX(90deg);
      opacity: 0;
    }
    51% {
      opacity: 0.99;
    }
    100% {
      opacity: 0.99;
      transform: rotateX(0deg);
      z-index: 5;
    }
  }