.coin-frame-equipped {
  isolation: isolate;
}
.coin-frame-equipped > .coin {
  transform: scale(var(--coin-frame-scale, 0.64));
  transform-origin: center;
}
.coin-frame-layer {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  border: 0;
  border-radius: 0;
  max-width: none !important;
}
.coin-frame-layer picture,
.coin-frame-layer img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  border-radius: 0;
  clip-path: none;
  user-select: none;
}
#coin-frame-shop {
  margin-top: 42px;
  padding-top: 27px;
  border-top: 1px solid var(--line);
}
.coin-frame-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.coin-frame-heading h2 {
  font: 500 30px var(--display);
  letter-spacing: -0.7px;
  margin: 10px 0;
}
.coin-frame-heading p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.coin-frame-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.coin-frame-card {
  min-width: 0;
  background: #1b2018;
  border: 1px solid #444d39;
  border-radius: 17px;
  overflow: hidden;
}
.coin-frame-card.equipped {
  border-color: #bfd58e;
}
.coin-frame-stage {
  height: 310px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse, #8d886028, transparent 70%), #20251c;
}
.coin-frame-demon .coin-frame-stage {
  background: radial-gradient(ellipse, #7d262431, transparent 70%), #211c1b;
}
.coin-frame-sample {
  width: 205px;
  height: 205px;
  position: relative;
  isolation: isolate;
}
.coin-frame-sample > .coin {
  width: 100%;
  height: 100%;
}
.coin-frame-sample > .mint-render {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  max-width: none;
  z-index: 1;
}
.coin-frame-copy {
  padding: 21px 25px 25px;
  border-top: 1px solid #38432d;
}
.coin-frame-copy h3 {
  font: 500 29px var(--display);
  letter-spacing: -0.7px;
  margin: 11px 0;
}
.coin-frame-copy p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 20px;
  min-height: 40px;
}
.coin-frame-copy .flip-button {
  width: 100%;
  justify-content: center;
  min-height: 46px;
}
.coin-frame-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 0;
}
.coin-frame-current strong {
  display: block;
  font-size: 18px;
  margin: 8px 0;
}
.coin-frame-current p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.coin-frame-current button {
  min-height: 44px;
  white-space: nowrap;
}
.coin-frame-heading .tiny-pill {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .coin-frame-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .coin-frame-heading {
    align-items: flex-start;
  }
  .coin-frame-heading h2 {
    font-size: 27px;
  }
  .coin-frame-heading p {
    font-size: 12px;
  }
  .coin-frame-heading .tiny-pill {
    font-size: 7px;
  }
  .coin-frame-stage {
    height: 280px;
  }
  .coin-frame-sample {
    width: 218px;
    height: 218px;
  }
  .coin-frame-copy {
    padding: 20px;
  }
  .coin-frame-current {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .coin-frame-current button {
    width: 100%;
    justify-content: center;
  }
  .coin-frame-copy .flip-button {
    min-height: 48px;
    font-size: 14px;
  }
}
.coin-wrap.coin-frame-equipped {
  translate: 0 14px;
}
.coin-frame-layer canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  max-width: none;
}
.coin-frame-layer > :is(picture, canvas) {
  position: absolute;
  inset: 0;
  z-index: 4;
}
.coin-frame-layer > .coin-frame-feathers {
  z-index: 6;
}
.coin-frame-layer [hidden] {
  display: none !important;
}
@media (min-width: 701px) and (max-height: 760px) {
  body.battle-page #view-battle .arena-heading {
    margin-bottom: 8px;
  }
  body.battle-page #view-battle .arena-heading h1 {
    font-size: 27px;
  }
  body.battle-page #view-battle .arena-card {
    padding: 10px 16px;
    gap: 6px;
  }
  body.battle-page #view-battle .duel-coin-stage {
    min-height: 170px;
  }
  body.battle-page #view-battle .personal-coin-slot .duel-coin {
    width: clamp(120px, 11vw, 154px);
  }
  body.battle-page #view-battle .central-duel-coin {
    width: clamp(150px, 13vw, 182px);
  }
  body.battle-page #view-battle .duel-player {
    padding: 8px;
    gap: 8px;
  }
  body.battle-page #view-battle .duel-player > .frame-collection {
    --collection-size: 64px;
  }
  body.battle-page #view-battle .duel-player-name h2 {
    font-size: 15px;
  }
  body.battle-page #view-battle .duel-player-score > strong {
    font-size: 33px;
  }
  body.battle-page #view-battle .duel-player-current {
    padding-top: 6px;
    font-size: 11px;
  }
  body.battle-page #view-battle .pvp-flip {
    height: 26px;
    font-size: 12px;
  }
  body.battle-page #view-battle .arena-actions > .flip-button,
  body.battle-page #view-battle .duel-choice-row > button {
    min-height: 44px;
    padding: 9px 13px;
    font-size: 14px;
  }
  body.battle-page #view-battle .arena-meta .quiet-button {
    min-height: 28px;
    font-size: 11px;
  }
  body.battle-page #view-battle .arena-message {
    min-height: 22px;
    font-size: 14px;
  }
}

/* Fixed glass sits behind the rotating face and seals the ornament aperture. */
.coin-frame-equipped:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: var(--coin-glass-size, 60%);
  height: var(--coin-glass-size, 60%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, #fff6 0%, #fff1 23%, transparent 39% 58%, #fff2 73%, transparent 88%),
    radial-gradient(
      circle at 32% 20%,
      rgba(var(--coin-glass-tint, 180, 180, 170), 0.86),
      rgba(var(--coin-glass-tint, 180, 180, 170), 0.46) 42%,
      #25302bf2 80%,
      #101a15
    );
  box-shadow:
    inset 0 0 0 1px #f6fff466,
    inset 0 3px 7px #fff3,
    inset 0 -9px 14px #0005,
    0 0 8px rgba(var(--coin-glass-tint, 180, 180, 170), 0.14);
}

/* Streak fire envelopes the fixed frame rim while the face turns inside it. */
.coin-frame-aura {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 190%;
  height: 190%;
  max-width: none !important;
  pointer-events: none;
  z-index: 7;
}
.duel-coin > .coin-frame-aura,
.coin-frame-sample > .coin-frame-aura,
.collection-coin > .coin-frame-aura,
.podium-coin > .coin-frame-aura,
.profile-showcase-coin > .coin-frame-aura {
  width: 160%;
  height: 160%;
}
.coin-frame-aura[hidden] {
  display: none !important;
}
