/*
 * APOC Vault – Mitgliederbereich & Aufdeck-Erlebnis
 * Farbwelt und Schriften wie Galerie und Startseite: Night, Logo-Rot, Bone; Archivo im Duett mit Bodoni Moda.
 * Schriften liegen im Plugin (SIL Open Font License) – nichts wird bei Google geladen.
 */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../fonts/archivo.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/bodoni-moda.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); }

.av-root, .av-stage, .av-modal, .av-toasts {
  --night: #0d0a09; --soot: #171211; --coal: #211917; --scab: #3c1712; --vermilion: #e44028; --bone: #ece3d6; --ash: #a39589; --gold: #c9a24a;
  --rule: rgba(236, 227, 214, .14); --veil: rgba(13, 10, 9, .86);
  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --wrap: 1240px; --card-r: 4.6% / 3.3%;
  color: var(--bone); font-family: var(--display); -webkit-font-smoothing: antialiased;
}
html.av-lock, html.av-lock body { overflow: hidden; }

/* ---------- page shell ---------- */
body.apoc-vault-page { margin: 0; background: #0d0a09; color: #ece3d6; overflow-x: clip; }
body.apoc-vault-page::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 45% at 78% 12%, rgba(228, 64, 40, .14), transparent 70%),
    radial-gradient(50% 40% at 8% 88%, rgba(60, 23, 18, .5), transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .9  0 0 0 0 .85  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.apoc-vault-noscript { padding: 40px; text-align: center; }
.av-root { position: relative; z-index: 1; font-size: clamp(1rem, .97rem + .18vw, 1.08rem); line-height: 1.6; }
.av-root *, .av-stage *, .av-modal * { box-sizing: border-box; }
.av-shell { min-height: 100vh; display: flex; flex-direction: column; }
.av-embed .av-shell { min-height: 0; }
.av-top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px); background: linear-gradient(rgba(13, 10, 9, .94), rgba(13, 10, 9, .76)); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
body.admin-bar .av-top { top: 32px; }
@media (max-width: 782px) { body.admin-bar .av-top { top: 0; } }
.av-embed .av-top { position: relative; top: auto; border: 1px solid var(--rule); }
.av-wordmark { font: 900 1.02rem/1 var(--display); font-stretch: 125%; letter-spacing: .28em; color: var(--bone); text-decoration: none; white-space: nowrap; }
.av-wordmark:hover { color: var(--vermilion); }
.av-nav { display: flex; gap: clamp(10px, 2vw, 26px); flex: 1; justify-content: center; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
.av-nav a { position: relative; color: var(--ash); text-decoration: none; padding: 6px 0; white-space: nowrap; }
.av-nav a:hover { color: var(--bone); }
.av-nav a.av-on { color: var(--bone); }
.av-nav a.av-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--vermilion); }
.av-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--vermilion); color: #fff; font: 800 .66rem/1 var(--display); letter-spacing: 0; vertical-align: 1px; animation: av-pulse 2.4s ease-in-out infinite; }
@keyframes av-pulse { 50% { box-shadow: 0 0 0 6px rgba(228, 64, 40, 0); } 0% { box-shadow: 0 0 0 0 rgba(228, 64, 40, .55); } }
.av-topright { display: flex; align-items: center; gap: 18px; font-size: .78rem; }
.av-who { display: flex; align-items: center; gap: 12px; }
.av-whoname { color: var(--ash); letter-spacing: .06em; }
.av-whocoins { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: .04em; }
.av-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e6dccb, #8d867b 55%, #3a3632); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); flex: none; }
.av-sitemenu { position: relative; }
.av-sitemenu summary { list-style: none; cursor: pointer; color: var(--ash); letter-spacing: .18em; text-transform: uppercase; font-size: .74rem; }
.av-sitemenu summary::-webkit-details-marker { display: none; }
.av-sitemenu summary:hover { color: var(--bone); }
.av-sitemenu ul { position: absolute; right: 0; top: calc(100% + 14px); margin: 0; padding: 10px 0; list-style: none; min-width: 220px; background: var(--soot); border: 1px solid var(--rule); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); z-index: 50; }
.av-sitemenu a { display: block; padding: 8px 18px; color: var(--bone); text-decoration: none; font-size: .86rem; }
.av-sitemenu a:hover { background: rgba(228, 64, 40, .12); }
.av-view { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px) 80px; outline: none; }
.av-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px clamp(16px, 4vw, 48px); border-top: 1px solid var(--rule); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }

@media (max-width: 900px) {
  .av-top { flex-wrap: wrap; gap: 10px 18px; padding-bottom: 0; }
  .av-topright { margin-left: auto; }
  .av-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding-left: clamp(16px, 4vw, 48px); padding-right: 16px; }
  .av-nav::-webkit-scrollbar { display: none; }
  .av-whoname { display: none; }
}

/* ---------- type ---------- */
.av-kicker { display: block; font: 700 .7rem/1.3 var(--display); letter-spacing: .26em; text-transform: uppercase; color: var(--vermilion); }
.av-head { margin-bottom: clamp(24px, 4vw, 44px); max-width: 780px; }
.av-head h1 { margin: 10px 0 0; font: italic 500 clamp(2.1rem, 1.4rem + 3.4vw, 4rem)/1.02 var(--serif); letter-spacing: -.01em; }
.av-head p { margin: 14px 0 0; color: var(--ash); max-width: 60ch; }
.av-small { font-size: .82rem; color: var(--ash); }
.av-small a, .av-link { color: var(--bone); }
.av-link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.av-note { color: var(--ash); font-style: italic; }
.av-ok { display: inline-block; margin-left: 6px; padding: 1px 8px; border: 1px solid rgba(160, 200, 150, .4); color: #b9d4ae; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; color: var(--bone); }

/* ---------- controls ---------- */
.av-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  font: 800 .74rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--vermilion); border: 1px solid var(--vermilion); transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.av-btn:hover { background: #f05a40; }
.av-btn:active { transform: translateY(1px); }
.av-btn:disabled { opacity: .5; cursor: default; }
.av-btn.av-ghost { background: transparent; color: var(--bone); border-color: rgba(236, 227, 214, .35); }
.av-btn.av-ghost:hover { border-color: var(--bone); background: rgba(236, 227, 214, .06); }
.av-btn.av-armed { background: var(--scab); border-color: var(--vermilion); color: #fff; }
.av-btn.av-wide { width: 100%; }
.av-btn:focus-visible, .av-tile:focus-visible, .av-coin:focus-visible, .av-packtile:focus-visible, .av-card:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 3px; }
.av-icon { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--rule); color: var(--bone); cursor: pointer; font-size: 1rem; }
.av-icon:hover { border-color: var(--bone); }
.av-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.av-row.av-wrap { flex-wrap: wrap; justify-content: flex-start; }
.av-center { display: flex; justify-content: center; margin: 32px 0; }
.av-loading { display: grid; place-items: center; padding: 80px 0; }
.av-loading span { width: 34px; height: 34px; border: 2px solid var(--rule); border-top-color: var(--vermilion); border-radius: 50%; animation: av-spin 1s linear infinite; }
@keyframes av-spin { to { transform: rotate(360deg); } }
.av-empty { padding: 60px 0; text-align: center; color: var(--ash); }
.av-empty h2 { font: italic 500 1.8rem/1.2 var(--serif); color: var(--bone); }
.av-empty .av-btn { margin-top: 18px; }

.av-form { display: grid; gap: 16px; }
.av-form[hidden] { display: none; }
.av-form label, .av-auction label, .av-inscr label { display: grid; gap: 6px; }
.av-form label span, .av-auction label span, .av-inscr label span, .av-toolbar label span { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.av-root input:not([type=checkbox]):not([type=range]), .av-root select, .av-root textarea, .av-modal input:not([type=checkbox]):not([type=range]), .av-modal select, .av-modal textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; font: 500 1rem/1.4 var(--display); color: var(--bone);
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(236, 227, 214, .22); border-radius: 0; outline: none; transition: border-color .2s;
}
.av-root textarea, .av-modal textarea { resize: vertical; min-height: 100px; }
.av-root input:focus, .av-root select:focus, .av-root textarea:focus, .av-modal input:focus, .av-modal select:focus, .av-modal textarea:focus { border-color: var(--vermilion); }
.av-root select, .av-modal select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ash) 50%), linear-gradient(135deg, var(--ash) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.av-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.av-msg { min-height: 0; font-size: .9rem; }
.av-msg:not(:empty) { margin-bottom: 16px; padding: 12px 14px; border-left: 3px solid var(--ash); background: rgba(236, 227, 214, .05); }
.av-msg.av-err { border-color: var(--vermilion); background: rgba(228, 64, 40, .1); }
.av-msg.av-ok { border-color: #8fb37f; background: rgba(143, 179, 127, .1); }

/* ---------- auth ---------- */
.av-auth { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 6vw, 90px); align-items: center; min-height: 62vh; }
.av-auth-copy h1 { margin: 12px 0 18px; font: 500 clamp(3rem, 2rem + 5vw, 6rem)/.95 var(--serif); letter-spacing: -.02em; }
.av-auth-copy h1 em { font-style: italic; color: var(--vermilion); }
.av-auth-copy p { color: var(--ash); max-width: 46ch; }
.av-auth-coin { width: min(300px, 60vw); aspect-ratio: 1; margin-top: 18px; }
.av-auth-coin canvas, .av-auth-coin img { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.av-auth-card { padding: clamp(22px, 3.4vw, 40px); background: linear-gradient(180deg, rgba(33, 25, 23, .92), rgba(23, 18, 17, .92)); border: 1px solid var(--rule); box-shadow: 0 40px 80px rgba(0, 0, 0, .5); }
.av-tabs { display: flex; gap: 28px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.av-tabs button { padding: 0 0 12px; background: none; border: 0; color: var(--ash); cursor: pointer; font: 800 .74rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.av-tabs button.av-on { color: var(--bone); border-color: var(--vermilion); }
.av-turnstile:empty { display: none; }
@media (max-width: 860px) { .av-auth { grid-template-columns: 1fr; min-height: 0; } .av-auth-coin { display: none; } }

/* ---------- Neu ---------- */
.av-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.av-packtile {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px; text-align: left; cursor: pointer; color: var(--bone);
  background: linear-gradient(135deg, rgba(33, 25, 23, .95), rgba(18, 14, 13, .95)); border: 1px solid var(--rule); font: inherit; transition: border-color .25s, transform .25s;
}
.av-packtile:hover { border-color: rgba(236, 227, 214, .4); transform: translateY(-2px); }
.av-packtile.av-hasspecial::after { content: ""; position: absolute; inset: -1px; pointer-events: none; border: 1px solid rgba(201, 162, 74, .5); animation: av-breathe 3.6s ease-in-out infinite; }
@keyframes av-breathe { 50% { opacity: .25; } }
.av-packtxt b { display: block; margin: 4px 0 2px; font: italic 500 1.25rem/1.2 var(--serif); }
.av-packtxt small { color: var(--ash); font-size: .8rem; }
.av-packcta { font: 800 .68rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--vermilion); }
.av-minipack { position: relative; width: 66px; height: 100px; display: grid; place-items: end center; padding-bottom: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--c1, #3a0f0c) 70%, #fff 10%), var(--c1, #3a0f0c) 55%, color-mix(in srgb, var(--c1, #3a0f0c) 70%, #000)); box-shadow: 0 10px 24px rgba(0, 0, 0, .55); overflow: hidden; }
.av-minipack.foil::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%); animation: av-glint 3.4s ease-in-out infinite; }
@keyframes av-glint { 0%, 60% { transform: translateX(-80%); } 100% { transform: translateX(80%); } }
.av-minipack i { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 5px); }
.av-minipack b { position: relative; font: italic 600 .58rem/1.1 var(--serif); color: var(--c2, #c9a24a); text-align: center; padding: 0 4px; }
.av-minipack.paper { background: var(--c1, #d9ccb2); }
.av-minipack.paper::after { content: ""; position: absolute; left: 50%; top: 52%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: var(--c2, #7a1a14); }
.av-minicard img { width: 66px; aspect-ratio: 635 / 889; display: block; border-radius: var(--card-r); box-shadow: 0 10px 24px rgba(0, 0, 0, .55); object-fit: cover; }
.av-minicoin img { width: 76px; height: 76px; display: block; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.av-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 40px 0; background: var(--rule); border: 1px solid var(--rule); }
.av-stat { display: grid; gap: 4px; padding: 24px clamp(14px, 2.4vw, 28px); background: var(--night); color: var(--bone); text-decoration: none; transition: background .2s; }
.av-stat:hover { background: var(--soot); }
.av-stat b { font: 500 clamp(1.8rem, 1.2rem + 2.4vw, 3rem)/1 var(--serif); }
.av-stat span { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.av-section { margin-top: 36px; }
.av-sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 8px; }
.av-sechead h2 { margin: 0; font: italic 500 1.5rem/1.2 var(--serif); }
.av-sechead a { color: var(--ash); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.av-sechead a:hover { color: var(--bone); }
.av-chron { list-style: none; margin: 0; padding: 0; }
.av-chronitem { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 2px; border-bottom: 1px solid rgba(236, 227, 214, .07); font-size: .92rem; }
.av-chronitem time { color: var(--ash); font-size: .78rem; white-space: nowrap; }
.av-chronday { padding: 26px 0 6px; font: italic 500 1.15rem/1.2 var(--serif); color: var(--ash); }
.av-cardico { display: inline-block; width: 9px; height: 13px; border: 1px solid var(--bone); border-radius: 2px; flex: none; }

/* ---------- Sammlung ---------- */
.av-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 22px; margin-bottom: 26px; }
.av-toolbar label { display: grid; gap: 6px; min-width: 170px; }
.av-toolbar select { min-height: 40px; }
.av-count { margin-left: auto; color: var(--ash); font-size: .8rem; letter-spacing: .1em; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 18vw, 190px), 1fr)); gap: clamp(14px, 2vw, 26px); }
.av-tile { display: grid; gap: 10px; padding: 0; background: none; border: 0; color: var(--bone); text-align: left; cursor: pointer; font: inherit; animation: av-rise .6s both; animation-delay: var(--d, 0ms); }
@keyframes av-rise { from { opacity: 0; transform: translateY(14px); } }
.av-tileimg { position: relative; display: block; border-radius: var(--card-r); overflow: hidden; box-shadow: 0 14px 30px rgba(0, 0, 0, .5); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; aspect-ratio: 635 / 889; background: var(--soot); }
.av-tileimg img { width: 100%; height: 100%; display: block; object-fit: cover; }
.av-tile:hover .av-tileimg { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 24px 44px rgba(0, 0, 0, .65); }
.av-tile.av-tier-special .av-tileimg { box-shadow: 0 14px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(228, 64, 40, .55); }
.av-tile.av-tier-rare .av-tileimg { box-shadow: 0 14px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(201, 162, 74, .7), 0 0 26px rgba(201, 162, 74, .18); }
.av-tilecap b { display: block; font: italic 500 1.02rem/1.25 var(--serif); }
.av-tilecap small { color: var(--ash); font-size: .76rem; }
.av-flag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; background: rgba(13, 10, 9, .85); color: var(--gold); font: 800 .6rem/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; font-style: normal; }

/* ---------- Cosmic Coins ---------- */
.av-coingrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 13vw, 140px), 1fr)); gap: clamp(10px, 1.8vw, 22px); }
.av-coin { position: relative; display: grid; justify-items: center; gap: 8px; padding: 8px 4px; background: none; border: 0; color: var(--ash); cursor: pointer; font: inherit; }
.av-coin b { font: 600 .72rem/1 var(--display); letter-spacing: .1em; }
.av-coin:hover b { color: var(--bone); }
.av-coinwrap { width: 100%; aspect-ratio: 1; display: block; border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(236, 227, 214, .06), transparent 70%); }
.av-coinimg { width: 100%; height: 100%; display: block; opacity: 0; transform: scale(.94); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }
.av-coinimg.av-in { opacity: 1; transform: none; }
.av-coin:hover .av-coinimg { transform: rotate(-8deg) scale(1.04); }
.av-inscribed { position: absolute; right: 12%; top: 6%; font-style: normal; color: var(--gold); font-size: .8rem; }

/* ---------- Spiele ---------- */
.av-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.av-game { display: grid; grid-template-rows: auto 1fr; background: var(--soot); border: 1px solid var(--rule); color: var(--bone); text-decoration: none; overflow: hidden; transition: border-color .25s, transform .25s; }
a.av-game:hover { border-color: rgba(236, 227, 214, .45); transform: translateY(-3px); }
.av-gamecover { aspect-ratio: 16 / 9; display: block; background: radial-gradient(120% 90% at 30% 20%, var(--scab), var(--night)); overflow: hidden; }
.av-gamecover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-game-ub .av-gamecover { background: radial-gradient(90% 80% at 70% 30%, rgba(228, 64, 40, .35), transparent 60%), linear-gradient(160deg, #1d0f0c, #050303); }
.av-gametxt { display: grid; gap: 6px; padding: 18px 20px 22px; }
.av-gametxt b { font: italic 500 1.5rem/1.1 var(--serif); }
.av-gametxt small { color: var(--ash); font-size: .86rem; }
.av-soon { opacity: .55; }

/* ---------- Konto ---------- */
.av-konto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.av-panel { padding: clamp(20px, 3vw, 30px); background: var(--soot); border: 1px solid var(--rule); display: grid; gap: 16px; align-content: start; }
.av-panel h2 { margin: 0; font: italic 500 1.4rem/1.2 var(--serif); }
.av-range { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.av-range span { grid-column: 1 / -1; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.av-range input { width: 100%; accent-color: var(--vermilion); }
.av-range output { font-size: .82rem; color: var(--ash); min-width: 4ch; text-align: right; }
.av-check { display: flex; gap: 12px; align-items: center; cursor: pointer; font-size: .92rem; }
.av-check input { width: 18px; height: 18px; accent-color: var(--vermilion); }
.av-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: .9rem; }
.av-dl dt { color: var(--ash); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; padding-top: 3px; }
.av-dl dd { margin: 0; word-break: break-word; }

/* ---------- modal + detail ---------- */
.av-modal { position: fixed; inset: 0; z-index: 99990; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .3s; }
.av-modal.av-in { opacity: 1; }
.av-modal-back { position: absolute; inset: 0; background: rgba(8, 6, 5, .86); backdrop-filter: blur(6px); }
.av-modal-box { position: relative; width: min(1040px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: linear-gradient(180deg, #1b1412, #110d0c); border: 1px solid var(--rule); box-shadow: 0 50px 120px rgba(0, 0, 0, .7); transform: translateY(16px) scale(.985); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.av-modal.av-in .av-modal-box { transform: none; }
.av-modal-x { position: absolute; right: 10px; top: 10px; z-index: 3; background: rgba(13, 10, 9, .6); }
.av-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.av-detail-stage { display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); background: radial-gradient(70% 60% at 50% 40%, rgba(236, 227, 214, .07), transparent 70%); min-height: 380px; }
.av-detail-stage .av-card { --cw: min(320px, 62vw); }
.av-coindetail .av-detail-stage canvas, .av-coindetail .av-detail-stage img { width: min(420px, 78vw); aspect-ratio: 1; display: block; cursor: grab; touch-action: none; }
.av-detail-info { padding: clamp(24px, 4vw, 44px); display: grid; gap: 16px; align-content: start; border-left: 1px solid var(--rule); }
.av-detail-info h2 { margin: 0; font: italic 500 clamp(1.8rem, 1.3rem + 2vw, 2.6rem)/1.05 var(--serif); }
.av-cardtext { margin: 0; color: var(--ash); font-family: var(--serif); font-style: italic; }
.av-tiername { font-style: normal; color: var(--gold); }
.av-hist summary { cursor: pointer; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.av-hist ol { list-style: none; margin: 10px 0 0; padding: 0; font-size: .86rem; }
.av-hist li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(236, 227, 214, .07); }
.av-hist time { color: var(--ash); white-space: nowrap; }
.av-actions { display: grid; gap: 14px; }
.av-auction { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 16px; border: 1px solid var(--rule); align-items: end; }
.av-auction .av-kicker, .av-auction .av-btn { grid-column: 1 / -1; }
.av-chars { color: var(--ash); }
.av-turnhint { margin: 0; }
@media (max-width: 760px) {
  .av-detail { grid-template-columns: 1fr; }
  .av-detail-info { border-left: 0; border-top: 1px solid var(--rule); }
  .av-detail-stage { min-height: 0; }
}

/* ---------- toasts ---------- */
.av-toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100010; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.av-toast { padding: 12px 16px; background: var(--coal); border: 1px solid var(--rule); border-left: 3px solid var(--ash); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); font-size: .9rem; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.av-toast.av-in { opacity: 1; transform: none; }
.av-toast.av-ok { border-left-color: #8fb37f; }
.av-toast.av-err { border-left-color: var(--vermilion); }

/* ======================================================================
   The reveal stage
   ====================================================================== */
.av-stage {
  position: fixed; inset: 0; z-index: 100000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  background: radial-gradient(80% 70% at 50% 45%, #1a1210 0%, #070505 70%); opacity: 0; transition: opacity .45s;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  user-select: none; -webkit-user-select: none; overflow: hidden;
}
.av-stage.av-in { opacity: 1; }
.av-stage.av-out { opacity: 0; }
.av-stage-light { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(46% 42% at 50% 46%, rgba(255, 214, 170, .10), transparent 70%); animation: av-lamp 7s ease-in-out infinite; }
@keyframes av-lamp { 50% { opacity: .7; } }
.av-stage-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.av-stage-title { display: block; margin-top: 2px; font: italic 500 clamp(1.1rem, .9rem + 1vw, 1.6rem)/1.2 var(--serif); }
.av-stage-tools { display: flex; gap: 10px; align-items: center; }
.av-stage-main { position: relative; z-index: 1; display: grid; place-items: center; min-height: 0; perspective: 1400px; }
.av-stage-foot { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 60px; }
.av-hint { margin: 0; color: var(--ash); font-size: .86rem; text-align: center; }

/* pack */
.av-pack { position: relative; width: min(600px, 96vw); height: min(66vh, 640px); display: grid; place-items: center; }
.av-pack-gl { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.av-pack.av-tearing .av-pack-gl { cursor: grabbing; }
.av-pack-hint { position: absolute; left: 50%; top: 13%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: rgba(13, 10, 9, .7); font-size: .74rem; letter-spacing: .08em; color: var(--bone); white-space: nowrap; pointer-events: none; transition: opacity .4s; animation: av-hintin .6s 1.2s both; }
@keyframes av-hintin { from { opacity: 0; transform: translate(-50%, 6px); } }
.av-pack-arrow { width: 26px; height: 2px; background: var(--vermilion); position: relative; animation: av-swipe 1.8s ease-in-out infinite; }
.av-pack-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--vermilion); border-right: 0; }
@keyframes av-swipe { 0% { transform: translateX(-10px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateX(14px); opacity: 0; } }
.av-pack.av-started .av-pack-hint, .av-pack.av-tearing .av-pack-hint, .av-pack.av-torn .av-pack-hint, .av-pack.av-torn .av-pack-open { opacity: 0; pointer-events: none; }
.av-pack-open { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); transition: opacity .3s; }
.av-pack-gone { animation: av-packgone .5s ease-in forwards; }
@keyframes av-packgone { to { opacity: 0; transform: translateY(30%) scale(.92); } }
.av-pack-cssbody { width: min(300px, 64vw); aspect-ratio: 1.32 / 2; display: grid; place-content: center; text-align: center; gap: 8px; cursor: pointer; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 80%, #fff 12%), var(--c1) 50%, color-mix(in srgb, var(--c1) 70%, #000)); box-shadow: 0 40px 80px rgba(0, 0, 0, .6); color: var(--c2); }
.av-pack-cssbody b { font: italic 500 2rem/1 var(--serif); }
.av-pack-cssbody small { letter-spacing: .3em; text-transform: uppercase; font-size: .66rem; }

/* cards */
.av-cardrow {
  --cw: clamp(92px, calc((100vw - 48px - (var(--n) - 1) * 14px) / var(--n)), 230px);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; max-width: 100%; padding: 10px;
}
@media (max-height: 760px) { .av-cardrow { --cw: clamp(84px, calc((100vw - 48px - (var(--n) - 1) * 14px) / var(--n)), 26vh); } }
@media (max-width: 640px) { .av-cardrow { --cw: calc((100vw - 64px) / min(var(--n), 3)); max-height: 100%; } }
.av-card { position: relative; width: var(--cw, 220px); aspect-ratio: 635 / 889; flex: none; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; outline: none; }
.av-cardrow .av-card { opacity: 0; transform: translateY(46vh) rotate(calc((var(--i) - 2) * 4deg)) scale(.86); transition: opacity .5s, transform .75s cubic-bezier(.18, .9, .22, 1); }
.av-cardrow .av-card.av-dealt { opacity: 1; transform: none; }
.av-card-lift { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.av-card:hover .av-card-lift, .av-card.av-held .av-card-lift { transform: translateY(-6px); }
.av-card.av-rising .av-card-lift { transform: translateY(-18px) scale(1.05); transition-duration: .5s; }
.av-card-body { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.av-face { position: absolute; inset: 0; border-radius: var(--card-r); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #e9e1d3; }
.av-front { transform: translateZ(1.2px); }
.av-back { transform: rotateY(180deg) translateZ(1.2px); }
.av-face img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
.av-edge { position: absolute; inset: 0; border-radius: var(--card-r); background: #cfc5b4; transform: translateZ(calc((var(--i) - 2.5) * .42px)); }
.av-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15)); opacity: calc((1 - var(--light, 1)) * .9); }
.av-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 248, 235, .22) 48%, transparent 60%) no-repeat; background-size: 250% 100%; background-position: var(--sheen, 0%) 0; mix-blend-mode: screen; }
.av-holo { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s; background: conic-gradient(from calc(var(--light, 1) * 180deg) at 50% 50%, rgba(255, 120, 90, .0), rgba(255, 200, 120, .35), rgba(140, 220, 255, .3), rgba(220, 140, 255, .3), rgba(255, 120, 90, .0)); mix-blend-mode: color-dodge; }
.av-card.av-holo-on .av-holo { opacity: .38; }
.av-card-shadow { position: absolute; left: 6%; right: 6%; bottom: -5%; height: 9%; border-radius: 50%; background: rgba(0, 0, 0, .65); filter: blur(10px); transform: scaleX(calc(.4 + var(--light, 1) * .6)); z-index: -1; transition: opacity .3s; }
.av-card.av-glow.av-tier-special .av-card-lift { filter: drop-shadow(0 0 14px rgba(228, 64, 40, .45)); transition: filter 1.4s; }
.av-card.av-glow.av-tier-rare .av-card-lift { filter: drop-shadow(0 0 20px rgba(201, 162, 74, .5)); transition: filter 1.4s; }
.av-tier-rare.av-rising::before, .av-tier-special.av-rising::before { content: ""; position: absolute; inset: -30%; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 210, 150, .22), transparent); animation: av-flare 1.3s ease-out forwards; }
@keyframes av-flare { from { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } to { opacity: 0; transform: scale(1.15); } }

/* coins */
.av-coinstage { display: grid; justify-items: center; gap: 10px; width: 100%; }
.av-coinbig { width: min(440px, 80vw, 52vh); aspect-ratio: 1; }
.av-coinbig canvas, .av-coinflat { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.av-coininfo { text-align: center; opacity: 0; transform: translateY(8px); }
.av-coininfo.av-show { animation: av-rise .7s .9s both; opacity: 1; transform: none; }
.av-coincode { display: block; font: 500 clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem)/1.1 var(--serif); letter-spacing: .04em; }
.av-coinmeta { color: var(--ash); font-size: .82rem; }
.av-coinrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; max-width: min(760px, 100%); }
@media (max-width: 560px) { .av-cointhumb { width: 52px; height: 52px; } }
.av-cointhumb { width: 64px; height: 64px; padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer; opacity: 0; transform: translateY(-40px) rotate(-30deg); transition: opacity .35s, transform .55s cubic-bezier(.3, 1.5, .5, 1); }
.av-cointhumb.av-in { opacity: .7; transform: none; }
.av-cointhumb.av-active, .av-cointhumb:hover { opacity: 1; }
.av-cointhumb.av-active { box-shadow: 0 0 0 2px var(--vermilion); }
.av-cointhumb img { width: 100%; height: 100%; display: block; }
.av-coinmore { font: 800 .9rem/1 var(--display); color: var(--ash); padding: 0 8px; }

/* summary */
.av-summary { display: grid; justify-items: center; gap: 14px; text-align: center; width: min(980px, 100%); max-height: 100%; overflow: auto; padding: 10px; opacity: 0; transform: translateY(12px); transition: opacity .6s, transform .6s; }
.av-summary.av-in { opacity: 1; transform: none; }
.av-summary h2 { margin: 0; font: 500 clamp(1.8rem, 1.2rem + 2.6vw, 3.2rem)/1.05 var(--serif); }
.av-summary h2 i { color: var(--vermilion); }
.av-sumgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 10px; }
.av-sumcard, .av-sumcoin { margin: 0; display: grid; justify-items: center; gap: 6px; }
.av-sumcard img { width: clamp(90px, 14vw, 140px); aspect-ratio: 635 / 889; object-fit: cover; border-radius: var(--card-r); box-shadow: 0 16px 30px rgba(0, 0, 0, .6); }
.av-sumcard.av-tier-rare img { box-shadow: 0 16px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(201, 162, 74, .7), 0 0 24px rgba(201, 162, 74, .25); }
.av-sumcard.av-tier-special img { box-shadow: 0 16px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(228, 64, 40, .6); }
.av-sumcoin img, .av-summore span { width: clamp(60px, 9vw, 90px); aspect-ratio: 1; }
.av-summore span { display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--rule); font: 800 1rem/1 var(--display); color: var(--ash); }
.av-sumcard figcaption, .av-sumcoin figcaption { font-size: .74rem; color: var(--ash); max-width: 140px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .av-root *, .av-stage *, .av-modal * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- small screens: reveal chrome ---------- */
.av-stage-top > div:first-child { min-width: 0; flex: 1; }
@media (max-width: 560px) {
  .av-stage-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .av-stage-top .av-kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .av-stage-tools .av-btn { min-height: 40px; padding: 0 12px; letter-spacing: .14em; font-size: .66rem; }
  .av-stage-tools .av-icon { width: 40px; height: 40px; }
  .av-pack-hint { white-space: normal; text-align: left; max-width: 86%; font-size: .7rem; top: 9%; }
  .av-pack { height: min(62vh, 560px); }
}
