.pack-tear-mount.pt-mounted {
  position: relative;
  width: clamp(168px, 37vw, 228px);
  aspect-ratio: .69;
  max-width: min(72vw, 228px);
  isolation: isolate;
  z-index: 2;
  --pt-foil: #6e1721;
  --pt-hot: #df7f56;
  --pt-shadow: #251017;
  --pt-rarity: #ffd28d;
  --pt-cut: #ffdaad;
}

.pt-shell {
  position: absolute;
  inset: 0;
  perspective: 950px;
  transform-style: preserve-3d;
  --pt-ry: 0deg;
  --pt-rx: 0deg;
  --pt-shine: 42%;
}

.pt-pack,
.pt-flap,
.pt-chunk,
.pt-face,
.pt-flap-lining,
.pt-lip {
  position: absolute;
  inset: 0;
}

.pt-pack,
.pt-flap,
.pt-chunk {
  transform-style: preserve-3d;
}

.pt-pack {
  pointer-events: none;
  transform: rotateX(var(--pt-rx)) rotateY(var(--pt-ry)) rotateZ(-3deg);
  transition: transform 140ms ease-out;
}

.pt-face {
  overflow: hidden;
  border: 1px solid rgba(255, 205, 156, .57);
  border-radius: 4px 4px 3px 3px;
  isolation: isolate;
  background-color: var(--pt-foil);
  background-image:
    linear-gradient(90deg, rgba(24, 6, 12, .83), transparent 13%, transparent 87%, rgba(24, 6, 12, .83)),
    linear-gradient(113deg, rgba(68, 11, 20, .16), rgba(22, 11, 17, .11) 38%, rgba(252, 160, 87, .12) 63%, rgba(38, 7, 13, .29)),
    var(--pack-art, linear-gradient(156deg, #41131d, #9c2534 41%, #55161e 77%, #2a1017));
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 2px 1px rgba(255, 224, 177, .44),
    inset 0 0 12px rgba(22, 5, 9, .72),
    0 10px 38px rgba(10, 3, 5, .8);
}

.pt-face::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9% 2.7%;
  border: 1px solid rgba(255, 193, 121, .23);
  box-shadow: 0 0 0 2px rgba(58, 14, 21, .42);
  pointer-events: none;
}

.pt-face::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6% 0;
  opacity: .62;
  background:
    repeating-linear-gradient(164deg, transparent 0 6px, rgba(255, 246, 209, .15) 6.4px 7.12px, transparent 7.6px 13px),
    linear-gradient(105deg, rgba(29, 5, 10, .32) 4%, transparent 17%, rgba(255, 227, 195, .11) 34%, transparent 52%, rgba(5, 4, 11, .25) 88%);
  mix-blend-mode: screen;
}

.pt-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(121deg, transparent 0 21%, rgba(222, 238, 255, .16) 30%, rgba(255, 237, 180, .28) 39%, rgba(255, 157, 123, .14) 45%, transparent 55% 66%, rgba(194, 222, 255, .17) 78%, transparent 83%);
  background-size: 245% 160%;
  background-position: var(--pt-shine) center;
  mix-blend-mode: color-dodge;
  opacity: .66;
  transition: background-position 100ms ease-out;
}

.pt-crimp {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 6.8%;
  background:
    repeating-linear-gradient(90deg, rgba(12, 4, 11, .60) 0 1px, rgba(255, 214, 159, .32) 1.3px 2px, transparent 2.2px 4.6px),
    linear-gradient(180deg, #b77f64 0, #69353b 29%, #95414a 47%, #351724 82%, #6b393f 100%);
  box-shadow: 0 1px 3px rgba(12, 2, 7, .8), inset 0 1px rgba(255, 229, 184, .38);
  opacity: .96;
}

.pt-crimp--top { top: 0; }
.pt-crimp--bottom { bottom: 0; transform: rotate(180deg); }

.pt-wordmark {
  position: absolute;
  inset: 43% 0 auto;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #fff1cc;
  text-shadow: 0 1px 1px rgba(26, 8, 10, .95), 0 0 9px #2f111b, 0 0 18px #210b16;
  font: 750 13px/1.35 "Noto Serif SC", SimSun, serif;
}

.pt-wordmark small { color: #fae1ad; font-size: 12px; letter-spacing: .22em; text-indent: .22em; }
.pt-wordmark strong { font-size: clamp(36px, 10vw, 56px); line-height: 1; font-weight: 900; }
.pt-wordmark i {
  width: 43%;
  height: 6px;
  margin: 5px 0;
  background: linear-gradient(90deg, transparent, #f6c690, transparent) center / 100% 1px no-repeat;
}
.pt-wordmark > span { font-size: 10px; letter-spacing: .17em; text-indent: .17em; }

.pt-lip {
  z-index: 1;
  pointer-events: none;
  clip-path: polygon(0 0, 0 0, 0 0);
  background: linear-gradient(112deg, #d29058, #fff9d4 18%, #ffd0a8 41%, #faf9ea 68%, #9d584d);
  box-shadow: 0 0 8px #ffe0ae;
}

.pt-flap {
  z-index: 4;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.pt-flap[hidden],
.pt-chunk[hidden] { display: none; }

.pt-chunk { transform-origin: top left; }
.pt-chunk .pt-face,
.pt-flap-lining { backface-visibility: hidden; }

.pt-flap-lining {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(91deg, rgba(255, 255, 255, .28) 0 1px, transparent 2px 4px),
    linear-gradient(76deg, #4f545e, #adb6bf 17%, #f3ecdb 38%, #6c6f7a 64%, #e8ddcf 83%, #8d6270);
}

.pt-preview {
  position: absolute;
  z-index: -1;
  inset: -21% -34% 4%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 29%, color-mix(in srgb, var(--pt-rarity) 76%, white), transparent 58%);
  filter: blur(18px);
  transform: scale(.8);
}

.pt-grab {
  position: absolute;
  z-index: 5;
  left: -4%;
  right: -4%;
  top: 1.5%;
  width: 108%;
  height: 15.5%;
  display: grid;
  align-content: center;
  padding: 0 10px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
  color: #fff6d7;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font: 850 9px/1.3 system-ui, sans-serif;
  letter-spacing: .19em;
}
.pt-grab span {
  transform: rotate(-3deg);
  padding: 2px 0 3px;
  border-bottom: 1px dashed rgba(248, 205, 155, .78);
  background: rgba(32, 11, 17, .48);
  text-shadow: 0 1px 2px #170710;
  transition: opacity 140ms ease-in, border-color 140ms ease-in;
}
.pt-grab:not(:disabled):hover span { border-color: #fff5ce; background: rgba(45, 13, 20, .78); }
.pt-grab:focus-visible { outline: 2px solid #ffe0ac; outline-offset: 4px; }
.pt-grab:disabled { cursor: default; opacity: .45; }

.pt-effects {
  position: absolute;
  z-index: 6;
  inset: -66% auto auto -65%;
  width: 230%;
  height: 216%;
  pointer-events: none;
}

.pt-is-tearing .pt-pack {
  transform: rotateX(-4deg) rotateY(calc(var(--pt-ry) * .34)) rotateZ(0deg) translateY(-2px);
  transition-duration: 110ms;
}

.pt-is-tearing .pt-grab { cursor: grabbing; }
.pt-is-tearing .pt-grab span, .pt-is-open .pt-grab { opacity: 0; }
.pt-is-open .pt-pack { animation: pt-packet-drop 440ms cubic-bezier(.57, .02, .71, .78) both; }
.pt-is-open .pt-flap { animation: pt-strip-leave 460ms cubic-bezier(.18, .56, .42, 1) both; }
.pt-is-preview .pt-pack { animation: pt-shake 330ms cubic-bezier(.35, .8, .49, 1) both; }
.pt-is-preview .pt-preview { animation: pt-peek 1.55s cubic-bezier(.15, .6, .43, 1) both; }

@keyframes pt-shake {
  0%, 100% { transform: rotateX(0) rotateY(0) rotateZ(-3deg); }
  22% { transform: translateX(8px) rotateY(-16deg) rotateZ(4deg) scale(.97, 1.02); }
  52% { transform: translateX(-9px) rotateY(19deg) rotateZ(-8deg) scale(1.02, .98); }
  72% { transform: translateX(3px) rotateY(-11deg) rotateZ(1deg); }
}
@keyframes pt-peek {
  0%, 100% { opacity: 0; transform: scale(.8); }
  23%, 62% { opacity: .86; transform: scale(1.12); }
}
@keyframes pt-packet-drop {
  0% { transform: rotateZ(0) translateY(0); opacity: 1; }
  22% { transform: translateY(8px) rotateZ(calc(var(--pt-direction, 1) * 4deg)); opacity: 1; }
  70% { opacity: .82; }
  100% { transform: translateY(92px) rotateZ(calc(var(--pt-direction, 1) * 15deg)) scale(.88); opacity: 0; }
}
@keyframes pt-strip-leave {
  0% { transform: rotateZ(calc(var(--pt-direction, 1) * 16deg)) rotateX(-35deg); opacity: 1; }
  55% { opacity: .86; }
  100% { transform: translateX(calc(var(--pt-direction, 1) * 106px)) translateY(-212px) rotateX(185deg) rotateZ(calc(var(--pt-direction, 1) * -98deg)); opacity: 0; }
}

@media (max-width: 540px) {
  .pack-tear-mount.pt-mounted { width: clamp(159px, 48vw, 178px); }
  .pt-effects { inset: -56% auto auto -40%; width: 180%; height: 190%; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-pack, .pt-sheen { transition: none; }
  .pt-is-open .pt-pack, .pt-is-open .pt-flap, .pt-is-preview .pt-pack, .pt-is-preview .pt-preview { animation: none; }
  .pt-is-preview .pt-preview { opacity: .55; }
}
