/* shared inner-page layout */
.page-head.left { text-align: left; margin-bottom: 26px; }
.page-head.left .lead { margin-inline: 0; }
.sub-title { font-size: 28px; color: var(--bone); }
.narrow { max-width: 640px; margin-inline: auto; }
.wrap.mid { max-width: 920px; }
.split { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 80px); align-items: center; }
@media (min-width: 861px) { .split { align-items: start; } .split-art { position: sticky; top: calc(var(--header-h) + 40px); } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-art { order: 2; } }
.wallet-row { display: flex; gap: 10px; align-items: center; }
.wallet-row input { flex: 1; min-width: 0; }
@keyframes blink { 50% { opacity: .3; } }

/* fanned 3D stack of vamps */
.coffin-stack { position: relative; height: 420px; perspective: 1000px; }
.coffin-stack .vcard { position: absolute; width: 200px; left: 50%; top: 50%; margin: -120px 0 0 -100px;
  transform: perspective(900px) translateX(calc(var(--k) * 64px)) translateZ(calc(-1 * abs(var(--k)) * 60px)) rotateY(calc(var(--k) * -16deg)) rotate(calc(var(--k) * 5deg)) rotateX(var(--rx)) rotateY(var(--ry));
  z-index: calc(10 - abs(var(--k))); animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--k) * .4s); }
@keyframes bob { 50% { translate: 0 -12px; } }
@media (max-width: 860px) { .coffin-stack { height: 300px; } .coffin-stack .vcard { width: 150px; margin: -90px 0 0 -75px; } }
@supports not (z-index: calc(1 - abs(1))) { .coffin-stack .vcard { transform: translateX(calc(var(--k) * 64px)) rotate(calc(var(--k) * 5deg)); } }

/* blood drips on success */
.drip { position: fixed; top: -20px; z-index: 90; width: 8px; height: 16px; background: var(--blood); box-shadow: 0 4px 0 #9b1426; animation: drip 2.2s cubic-bezier(.5, 0, .9, .6) forwards; }
@keyframes drip { 80% { opacity: 1; } to { transform: translateY(var(--h)) scaleY(1.6); opacity: 0; } }

/* check eligibility */
.check-form { display: flex; gap: 10px; align-items: center; }
.check-form input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .check-form { flex-direction: column; align-items: stretch; } }
.verdict { margin-top: 30px; perspective: 900px; }
.verdict .skeleton { aspect-ratio: auto; height: 140px; }
.seal { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 24px; margin: 4px; background: var(--slab); animation: sealin .6s cubic-bezier(.2, 1.4, .4, 1); transform-origin: 50% 0; }
@keyframes sealin { from { transform: rotateX(-80deg) translateY(-20px); opacity: 0; } }
.seal.yes { --line: var(--gold); background: linear-gradient(180deg, #3a1418 0 60%, #2a0e12 60%); }
.seal.no { --line: var(--moss); background: #182019; }
.seal.wait { --line: var(--line); }
.seal h2 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 6px; }
.seal p { margin: 0; color: var(--bone); }
/* stepped octagon coin */
.medal { width: 96px; height: 96px; display: grid; place-items: center; font-size: 44px; animation: spinY 3.5s steps(12) infinite;
  clip-path: polygon(30% 0, 70% 0, 70% 8%, 85% 8%, 85% 15%, 92% 15%, 92% 30%, 100% 30%, 100% 70%, 92% 70%, 92% 85%, 85% 85%, 85% 92%, 70% 92%, 70% 100%, 30% 100%, 30% 92%, 15% 92%, 15% 85%, 8% 85%, 8% 70%, 0 70%, 0 30%, 8% 30%, 8% 15%, 15% 15%, 15% 8%, 30% 8%);
  background: var(--grad-gold); box-shadow: inset 0 -8px 0 var(--gold-deep), inset 0 8px 0 #fff6cc; }
.seal.no .medal { background: var(--grad-moss); box-shadow: inset 0 -8px 0 var(--moss-deep), inset 0 8px 0 #c8e8b4; }
.seal.wait .medal { background: linear-gradient(180deg, #e8e2d4 0 18%, #b5ad9f 18% 72%, #7d766b 72%); box-shadow: inset 0 -8px 0 #4a453e; }
@keyframes spinY { 0%, 40% { transform: rotateY(0); } 60%, 100% { transform: rotateY(360deg); } }
.slots { display: flex; gap: 8px; margin-top: 12px; }
.slots i { width: 30px; height: 40px; clip-path: polygon(25% 0, 75% 0, 100% 22%, 80% 100%, 20% 100%, 0 22%); background: var(--grad-blood); }
@media (max-width: 560px) { .seal { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* mint */
.countdown { display: flex; justify-content: center; gap: clamp(10px, 2vw, 20px); margin: 14px 0 34px; perspective: 800px; }
.cd-unit { text-align: center; }
.cd-num { --line: var(--ink); display: grid; place-items: center; min-width: clamp(72px, 16vw, 130px); height: clamp(84px, 18vw, 140px); line-height: 1;
  padding: 0 12px .1em calc(12px + .07em); /* digit font sits slightly high and left */
  font-weight: 700; font-size: clamp(44px, 10vw, 88px); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #3a1a1e 0 50%, #2a1215 50%); color: var(--bone); text-shadow: 4px 4px 0 var(--blood-deep); }
.cd-num.tick { animation: tick .4s steps(4); }
@keyframes tick { from { transform: rotateX(-70deg); } }
.cd-unit small { display: block; margin-top: 18px; color: var(--mist); }
.cd-sep { align-self: flex-start; font-size: clamp(36px, 8vw, 70px); line-height: clamp(84px, 18vw, 140px); color: var(--blood); animation: blink 1s steps(2) infinite; }

.progress { margin: 0 0 32px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.progress-top b { font-size: 26px; }
.progress-top span { color: var(--mist); }
.bar { --line: var(--ink); --drop: transparent; position: relative; height: 26px; margin: 0 4px; background: #160f10; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); transition: width 1.2s steps(24);
  background: repeating-linear-gradient(90deg, transparent 0 10px, #160f10 10px 14px), var(--grad-blood); }

.phase-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0 4px 32px; }
@media (max-width: 620px) { .phase-tiles { grid-template-columns: 1fr; } }
.ptile { position: relative; padding: 18px 20px; background: var(--slab-hi); transition: transform .2s steps(3); }
.ptile h3 { font-size: 22px; margin: 0 0 4px; }
.ptile p { margin: 0; color: var(--mist); }
.ptile .state { position: absolute; top: 14px; right: 14px; font-size: 14px; padding: 3px 10px; background: var(--ink); clip-path: var(--notch); }
.ptile.live { --line: var(--gold); transform: translateY(-4px); background: linear-gradient(180deg, #4a1820 0 65%, #36111a 65%); }
.ptile.live .state { background: var(--blood); animation: blink 1.2s steps(2) infinite; }
.ptile.done { opacity: .55; }

.mint-box { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: center; }
@media (max-width: 720px) { .mint-box { grid-template-columns: 1fr; } .mystery { width: min(220px, 70%); margin: 0 auto; } }
.mint-side .skeleton { aspect-ratio: auto; height: 180px; }
.mystery { position: relative; perspective: 900px; }
.mystery .vcard { animation: hover3d 6s ease-in-out infinite; }
@keyframes hover3d { 0%, 100% { transform: perspective(800px) rotateY(-12deg) rotateX(6deg) translateY(0); } 50% { transform: perspective(800px) rotateY(12deg) rotateX(-4deg) translateY(-10px); } }
.mystery .q { position: absolute; inset: 6px 6px 46px; display: grid; place-items: center; font-size: 90px; font-weight: 700; color: var(--bone); text-shadow: 6px 6px 0 var(--blood-deep); pointer-events: none; }
.qty-row { display: flex; align-items: center; gap: 18px; margin: 6px 4px 18px; flex-wrap: wrap; }
.stepper { --drop: transparent; display: inline-flex; align-items: center; background: var(--ink); }
.stepper button { width: 52px; height: 52px; border: 0; background: none; color: var(--bone); font: 700 28px var(--font); cursor: pointer; }
.stepper button:hover:not(:disabled) { color: var(--gold); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 46px; text-align: center; font-size: 30px; font-weight: 700; }
.price-line { display: flex; justify-content: space-between; padding: 12px 0; border-block: 4px dotted var(--line); margin-bottom: 18px; }
.price-line b { color: var(--gold); font-size: 22px; }
.left-note { color: var(--mist); margin-bottom: 16px; }
.left-note b { color: var(--bone); }
.fee-note { margin-top: 12px; }
.big-state { text-align: center; padding: 40px 10px; }
.big-state h2 { font-size: clamp(30px, 5vw, 46px); }

/* coffin congratulations */
.coffin-modal .modal-box { width: min(620px, 100%); text-align: center; }
.coffin-modal .title { font-size: clamp(30px, 6vw, 44px); }
.coffin-modal .lead { margin: 0 auto 14px; }
.coffin { position: relative; width: 220px; height: 120px; margin: 10px auto 26px; perspective: 700px; }
.coffin-base { position: absolute; inset: 0; clip-path: polygon(20% 0, 80% 0, 100% 35%, 85% 100%, 15% 100%, 0 35%); background: #2e1408; box-shadow: inset 0 0 0 6px #7a3a1a; }
.coffin-lid { position: absolute; inset: 0; clip-path: polygon(20% 0, 80% 0, 100% 35%, 85% 100%, 15% 100%, 0 35%); background: linear-gradient(180deg, #a0522d 0 30%, #7a3a1a 30% 75%, #5a2a14 75%); transform-origin: 0 50%;
  animation: lid 1.1s .3s cubic-bezier(.5, 0, .3, 1.3) forwards; display: grid; place-items: center; }
.coffin-lid::after { content: ""; width: 40px; height: 54px; background: var(--gold); clip-path: polygon(35% 0, 65% 0, 65% 30%, 100% 30%, 100% 50%, 65% 50%, 65% 100%, 35% 100%, 35% 50%, 0 50%, 0 30%, 35% 30%); }
@keyframes lid { 40% { transform: translateY(-14px) rotate(-4deg); } to { transform: translate(-46%, -38%) rotate(-24deg); opacity: .95; } }
.coffin-glow { position: absolute; inset: 18% 22%; background: repeating-conic-gradient(#ffd27a 0 25%, transparent 0 50%) 0 0 / 8px 8px; clip-path: var(--notch); animation: glow 1.4s .6s steps(6) forwards; opacity: 0; }
.coffin-glow::after { content: ""; position: absolute; inset: 30% 25%; background: #fff0c8; clip-path: var(--notch); }
@keyframes glow { to { opacity: .9; transform: scale(1.4, 1.2); } }
.risen { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 6px 0 22px; }
.risen figure { width: 150px; margin: 0; opacity: 0; animation: rise .8s cubic-bezier(.2, 1.3, .4, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(60px) rotateX(60deg) scale(.6); } to { opacity: 1; transform: none; } }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* inventory */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 42vw), 1fr)); gap: 26px; align-items: start; perspective: 1200px; padding: 4px; }
.inv-card { --line: var(--ink); appearance: none; border: 0; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 12px;
  background: var(--grad-gold); color: var(--ink); min-width: 0; }
.inv-card:focus-visible { outline: 3px dashed var(--bone); outline-offset: 8px; }
.inv-img { position: relative; display: block; overflow: hidden; }
.inv-img img { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #000; }
.inv-img .shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 55%); opacity: 0; transition: opacity .2s; }
.inv-card:hover .shine { opacity: 1; }
.inv-id, .vm-id { padding: 3px 9px; font-size: 14px; font-weight: 600; color: var(--bone); background: var(--ink); clip-path: var(--notch); }
.inv-id { position: absolute; top: 6px; left: 6px; }
.inv-name { font-weight: 600; font-size: 17px; line-height: 1.2; padding: 0 4px; overflow-wrap: anywhere; }
.inv-more { margin: 0 4px; font-size: 14px; opacity: .75; text-decoration: underline; text-underline-offset: 3px; }
.inv-card:hover .inv-more { opacity: 1; }
@media (max-width: 560px) { .inv-grid { gap: 18px; } .inv-name { font-size: 15px; } }
.inv-new { animation: newflash .5s steps(2) 6; }
@keyframes newflash { 50% { --line: var(--bone); } }

.vamp-modal .modal-box { width: min(760px, 100%); }
.vm-grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; }
@media (max-width: 640px) { .vm-grid { grid-template-columns: 1fr; } .vm-art { width: min(240px, 80%); margin: 0 auto; } }
.vm-id { display: inline-block; font-size: 16px; }
.vm-name { font-size: clamp(28px, 5vw, 40px); margin: 12px 0 18px; overflow-wrap: anywhere; }
.trait-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 4px; }
.trait { --drop: transparent; padding: 10px 12px; background: var(--slab-hi); min-width: 0; }
.trait i { display: block; font-style: normal; font-size: 14px; color: var(--mist); }
.trait b { display: block; font-weight: 600; color: var(--gold); line-height: 1.2; overflow-wrap: anywhere; }
.inv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.inv-count { font-size: 22px; }
.inv-count b { color: var(--gold); font-size: 30px; }
.empty { text-align: center; padding: 50px 20px; }
.empty img { width: 120px; opacity: .55; filter: grayscale(.7); margin-bottom: 16px; }
.skeleton { aspect-ratio: .8; background: var(--slab-hi); animation: blink 1.2s steps(2) infinite; }

/* allowlist quests */
.quest-list { list-style: none; padding: 4px; margin: 0 0 26px; display: grid; gap: 22px; }
.quest { position: relative; padding: 18px 18px 16px; background: var(--slab-hi); transition: background .2s; }
.quest .field { margin-bottom: 0; }
.quest.done { --line: var(--moss); background: #1f281e; }
.quest.bad { --line: var(--blood); }
.quest.bad .q-num { border-color: var(--blood); }
.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.q-head h3 { font-size: 20px; margin: 0; }
.q-note { margin: 0 0 10px; }
/* empty pixel checkbox that fills in when the quest is done */
.q-num { flex: none; width: 30px; height: 30px; position: relative; font-size: 0; background: var(--ink); border: 4px solid var(--gold-deep); }
.quest.done .q-num { background: var(--moss); border-color: var(--moss-hi); }
.quest.done .q-num::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: 18px; font-weight: 700; }
.err-text { color: #ff8a8a; display: block; }
.err-text:empty { display: none; }
.prefix-input { --drop: transparent; display: flex; align-items: stretch; margin: 4px; background: var(--ink); }
.prefix-input:focus-within { --line: var(--gold); }
.prefix-input span { display: grid; place-items: center; padding: 0 4px 0 14px; color: var(--gold); font-size: 20px; }
.prefix-input input { flex: 1; min-width: 0; margin: 0; padding-left: 4px; box-shadow: none; }
.task-link[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.tick { display: flex; align-items: center; gap: 12px; margin-top: 14px; cursor: pointer; user-select: none; }
.tick input { appearance: none; flex: none; width: 26px; height: 26px; margin: 0; border: 4px solid var(--line); background: var(--ink); display: grid; place-items: center; cursor: pointer; }
.tick input:checked { background: var(--moss); border-color: var(--moss-hi); }
.tick input:checked::after { content: "✓"; color: var(--ink); font-weight: 700; line-height: 1; }
.drop { --drop: transparent; display: grid; place-items: center; min-height: 140px; padding: 14px; margin: 4px; background: var(--dither), var(--ink); cursor: pointer; text-align: center; transition: transform .15s steps(3); }
.drop:hover, .drop.over { --line: var(--gold); transform: translateY(-2px); }
.drop-empty { padding: 8px 12px; background: var(--ink); }
.drop-empty small { display: block; color: var(--mist); margin-top: 4px; }
.drop-preview { max-height: 220px; max-width: 100%; }
.drop.has-file .drop-empty { display: none; }

/* "wallets eligible" counter on the mint page */
.eligible { --line: var(--gold-deep); --drop: transparent; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 20px auto 0; padding: 8px 16px; width: fit-content; background: var(--ink); }
.eligible b { font-size: 24px; color: var(--gold); }
.eligible-of { color: var(--mist); }
.eligible.bump { animation: bump .5s steps(3); }
@keyframes bump { 40% { transform: scale(1.08); } }

/* "you have applied" card */
.applied { text-align: center; display: grid; justify-items: center; gap: 6px; padding-top: 34px; perspective: 800px; }
.applied.pop { animation: sealin .6s cubic-bezier(.2, 1.4, .4, 1); }
.applied-medal { width: 110px; height: 110px; font-size: 52px; margin-bottom: 6px; }
.applied-badge { padding: 4px 14px; font-weight: 600; color: var(--ink); background: var(--grad-moss); clip-path: var(--notch); }
.applied-title { font-size: clamp(32px, 6vw, 48px); margin: 10px 0 0; }
.applied-wallet { font-size: 20px; color: var(--gold); margin: 0; }
.applied-lead { margin: 4px auto 18px; max-width: 46ch; }
.applied-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
