/* Stage-specific pieces: admin bar, holding page, allowlist (premint), phase timeline (mint), tabs and My Cryptariums (post-mint). */

/* ── admin bar (only rendered for a signed-in admin) ── */
.admin-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; padding: 0.5rem 1rem; background: #1a1400; border-top: 1px solid var(--warn); font-family: var(--font-display); font-size: 0.78rem; color: var(--text); }
.admin-bar b { color: var(--warn); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 400; }
.admin-bar em { font-style: normal; color: var(--warn); }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.admin-bar nav a, .admin-dash { color: var(--body); text-decoration: none; padding: 0.25rem 0.55rem; border: 1px solid transparent; }
.admin-bar nav a[aria-current] { border-color: var(--warn); color: var(--text); }
.admin-dash { margin-left: auto; border-color: var(--border2); }
body:has(.admin-bar) .footer { padding-bottom: 4.5rem; }

/* ── holding page ── */
.closed { padding-bottom: 5rem; }
.closed p { border: 1px solid var(--border2); background: var(--surface); padding: 2rem; text-align: center; color: var(--body); margin: 0; }
.closed a { color: var(--accent); }

/* ── premint: allowlist ──
   Flow: one centred "check eligibility" card → (connected) a slim status bar → the ways onto the list,
   with the mint windows in a column beside them. */
.al { padding-bottom: 5rem; display: grid; gap: 2.2rem; }
.al-check { justify-self: center; width: min(100%, 40rem); border: 1px solid var(--border2); background: var(--surface); padding: 2.2rem 2rem 1.8rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.al-check h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: 0.16em; text-transform: uppercase; }
.al-check .al-lead { font-size: 1.05rem; }
.al-check[hidden], .al-bar[hidden] { display: none; }
.al-lead { margin: 0; color: var(--body); max-width: 44ch; }
.al-safe { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--muted); max-width: 52ch; }
.al-err { margin: 0; color: var(--bad); font-size: 0.86rem; }
/* connected: wallet · tier · one line of guidance · the one action that applies */
.al-bar { border: 1px solid var(--border2); background: var(--surface); padding: 1.1rem 1.4rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem 1.4rem; align-items: center; }
.al-bar > div:first-child { display: flex; flex-direction: column; gap: 0.45rem; }
.al-bar .al-who { margin: 0; font-family: var(--font-display); font-size: 0.82rem; color: var(--muted); letter-spacing: 0.06em; }
.al-bar .al-msg { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.al-bar .al-act { display: flex; gap: 0.6rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.al-bar .mint-btn { width: auto; padding-left: 1.6rem; padding-right: 1.6rem; }
.al-tier { justify-self: start; font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.45rem 0.9rem; border: 1px solid var(--border2); color: var(--muted); white-space: nowrap; }
.al-tier.guaranteed { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.al-tier.friends { color: var(--accent); border-color: var(--accent); }
.al-done { margin: 0; font-family: var(--font-display); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.08em; }
.al-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); gap: 1.6rem; align-items: start; }
.al-ways h3, .al-windows h3 { margin: 0 0 0.8rem; font-family: var(--font-display); font-weight: 400; font-size: 0.86rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.phases.phases-col { grid-template-columns: 1fr; margin: 0; }
/* after connecting, the way that's open to this wallet is the next step */
.way.focus { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.way .next { font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.ways { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.way { border: 1px solid var(--border); background: var(--surface); padding: 1.2rem 1.3rem; display: grid; gap: 0.6rem; justify-items: start; }
.way p { margin: 0; color: var(--body); font-size: 0.92rem; }
.way-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; justify-content: space-between; width: 100%; }
.way-head b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.tier-tag { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.25rem 0.55rem; border: 1px solid var(--accent); color: var(--accent); }
.tier-tag.g { background: transparent; color: var(--accent); } /* Guaranteed and Friends tags share the outline style */
.way .btn[aria-disabled] { opacity: 0.5; cursor: not-allowed; border-color: var(--border2); color: var(--muted); }
ul.friends { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); width: 100%; }
ul.friends li { background: var(--bg); padding: 0.65rem 0.8rem; display: flex; flex-direction: column; gap: 0.2rem; }
ul.friends a { align-self: flex-start; }
ul.friends a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border2); }
ul.friends a:hover { color: var(--accent); border-color: var(--accent); }
ul.friends span { font-family: var(--font-display); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── phase timeline (premint + mint) ── */
.phases { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border2); border: 1px solid var(--border2); }
.phase { background: var(--surface); padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; position: relative; }
.phase b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.04em; }
.ph-top { display: flex; justify-content: space-between; align-items: center; min-height: 1.4rem; }
.ph-n { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.ph-live { font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 0.15rem 0.45rem; }
.ph-who { font-size: 0.82rem; color: var(--body); }
.ph-time { font-family: var(--font-display); font-size: 0.82rem; color: var(--text); margin-top: 0.2rem; font-variant-numeric: tabular-nums; }
.phase.live { background: var(--raise); box-shadow: inset 0 2px 0 var(--accent); }
.phase.live .ph-time { color: var(--accent); }
.phase.ended { opacity: 0.5; }
.you { align-self: flex-start; margin-top: 0.35rem; font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.15rem 0.45rem; border: 1px solid var(--border2); color: var(--muted); }
.you.yes { border-color: var(--accent); color: var(--accent); }
.mint-phase { font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.06em; color: var(--body); display: flex; gap: 0.6rem; align-items: center; min-height: 1.5rem; }
.mint-phase b { font-weight: 400; color: var(--text); letter-spacing: 0.2em; text-transform: uppercase; }
.stepper[hidden] { display: none; }

/* ── post-mint tabs ── */
.tabs { display: flex; gap: 0; margin-bottom: 2.4rem; overflow-x: auto; scrollbar-width: none; }
.tabs::after { content: ''; flex: 1 0 0; }
.tabs button, .tabs::after { border-bottom: 1px solid var(--border2); }
.tabs button { background: none; border: 0; border-bottom: 1px solid var(--border2); padding: 1rem 1.4rem; font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); cursor: pointer; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; }
.tabs button:first-child { padding-left: 0; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected=true] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
[data-stage=postmint] .deck, [data-stage=postmint] .gallery, .mine { padding-bottom: 5rem; }
[role=tabpanel][hidden] { display: none !important; }

/* ── My Cryptariums ── */
.mine-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.4rem; margin-bottom: 1.4rem; }
.mine-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.mine-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.mine-note { color: var(--warn); font-size: 0.86rem; margin: 0 0 0.8rem; }
.mine-count { font-family: var(--font-display); color: var(--accent); margin: 0 0 0.8rem; letter-spacing: 0.06em; }
.mine .gate { border: 1px solid var(--border2); background: var(--surface); padding: 3rem 2rem; text-align: center; }
.mine .gate p { color: var(--body); margin: 0 auto 1.4rem; max-width: 44ch; }
.owned { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; }
.own { background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.own-open { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.own-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.own .img { aspect-ratio: 1; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.own .img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.own-open:hover img { transform: scale(1.03); }
.own .img i { width: 34%; height: 1px; background: var(--border2); }
.own .meta { padding: 0.8rem 0.9rem 0.4rem; }
.own .meta b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1rem; }
.own .meta span { display: block; font-size: 0.84rem; color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.own .acts { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 0.9rem 0.9rem; margin-top: auto; }
.own .acts .btn { min-height: 34px; padding: 0.35rem 0.7rem; font-size: 0.72rem; }

/* ── studio dialog ── */
.studio { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #050505; color: var(--text); overflow: auto; }
.studio::backdrop { background: #050505; }
.studio-main { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 2.4rem; padding: 3rem; align-items: center; }
.studio-view { position: relative; aspect-ratio: 1; width: min(100%, calc(100vh - 6rem)); justify-self: center; border: 1px solid var(--border2); background: var(--surface); }
.studio-view canvas, .studio-view .plate, .studio-view video { position: absolute; inset: 0; width: 100%; height: 100%; }
.studio-view canvas { cursor: grab; touch-action: none; }
.studio-view .plate { pointer-events: none; }
.studio-view video { object-fit: contain; background: #000; z-index: 2; }
.studio-side h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.05; }
.studio-side h3 { margin: 1.4rem 0 0.6rem; font-family: var(--font-display); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.studio-side .row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.studio-side .traits { margin-top: 1.6rem; }
.vid-opts { display: flex; gap: 0.8rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.vid-opts label { display: grid; gap: 0.25rem; font-size: 0.74rem; color: var(--muted); font-family: var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; }
.vid-opts select { background: var(--bg); color: var(--text); border: 1px solid var(--border2); padding: 0.5rem 0.6rem; font-family: var(--font-display); font-size: 0.85rem; min-height: 40px; }
.vid-note { font-size: 0.8rem; color: var(--muted); margin: 0.6rem 0 0; min-height: 1.2em; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .studio-main { grid-template-columns: 1fr; padding: 3.5rem 1rem 2rem; gap: 1.4rem; }
  .studio-view { width: 100%; }
}
@media (max-width: 640px) {
  .phases { grid-template-columns: 1fr; }
  .owned { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .tabs button { padding: 0.9rem 0.9rem; font-size: 0.82rem; }
}
.admin-bar span a { color: var(--text); }

@media (max-width: 860px) {
  .al-grid { grid-template-columns: 1fr; }
  .al-bar { grid-template-columns: 1fr; text-align: left; }
  .al-bar .al-act { justify-content: flex-start; }
  .al-check { padding: 1.8rem 1.2rem 1.5rem; }
}
.al-bar .al-tier { align-self: flex-start; }

/* ── Find the Relic card: the level seen from above, melting into the card ── */
.way.way-relic { padding: 0; gap: 0; overflow: hidden; position: relative; justify-items: stretch; }
.relic-art { position: relative; height: clamp(190px, 24vw, 290px); overflow: hidden;
  background: radial-gradient(60% 75% at 52% 58%, rgba(124, 98, 214, 0.22), transparent 70%), radial-gradient(40% 50% at 30% 62%, rgba(236, 160, 98, 0.14), transparent 70%); }
.relic-art img { position: absolute; left: 50%; top: 50%; width: 104%; height: auto; max-width: none; transform: translate(-50%, -50%);
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 96%); mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
  transition: transform 6s ease; }
.way-relic:hover .relic-art img, .way-relic.focus .relic-art img { transform: translate(-50%, -51.5%) scale(1.025); }
.relic-art::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to bottom, transparent, var(--surface)); }
.relic-body { position: relative; padding: 0 1.3rem 1.3rem; margin-top: -1.6rem; display: grid; gap: 0.7rem; }
.relic-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 0.2rem; }
.relic-cta .mint-btn, .al-act .mint-btn { min-width: 0; max-width: none; height: 48px; font-size: 0.95rem; letter-spacing: 0.22em; text-indent: 0.22em; padding: 0 1.5rem; flex: 0 0 auto; }
.relic-note { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); }
.way-relic .next { position: absolute; top: 0.9rem; left: 1.1rem; z-index: 2; background: var(--bg); padding: 0.2rem 0.5rem; border: 1px solid var(--accent); }
.way.way-relic.focus { box-shadow: 0 0 0 1px var(--accent), 0 18px 60px rgba(124, 98, 214, 0.18); border-color: var(--accent); }

/* ── Find the Relic, full screen ── */
html.relic-open { overflow: hidden; }
.relic-play { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #07070a; display: flex; flex-direction: column; }
.relic-play::backdrop { background: #07070a; }
.relic-top { flex: 0 0 auto; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0.6rem 0 1.1rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.relic-title { margin: 0; display: flex; align-items: baseline; gap: 0.9rem; min-width: 0; font-family: var(--font-display); }
.relic-title b { font-weight: 400; font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.relic-title span { font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.relic-x { background: none; border: 1px solid var(--border2); color: var(--text); font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.5rem 0.8rem; cursor: pointer; }
.relic-x:hover { border-color: var(--accent); color: var(--accent); }
.relic-stage { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
.relic-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #07070a; }
.relic-frame[hidden] { display: none; }
.relic-msg { margin: 0; color: var(--body); font-family: var(--font-display); letter-spacing: 0.06em; padding: 1rem; text-align: center; }

@media (max-width: 640px) {
  .relic-title span { display: none; }
  .relic-body { padding: 0 1rem 1.1rem; }
  .relic-cta .mint-btn, .al-act .mint-btn { flex: 1 1 auto; }
}
.mint-meta #limit:empty, .mint-meta .dot:has(+ #limit:empty) { display: none; }

/* ══ Frames, lighter (2026-10-31): transparent panels with a faint hairline and a soft top sheen, instead of
   filled grey boxes. Shared by the premint, mint, deck and holding-page frames so every edge lines up. ══ */
:root { --hair: rgba(212, 208, 200, 0.09); --hair-2: rgba(212, 208, 200, 0.16); --sheen: linear-gradient(180deg, rgba(212, 208, 200, 0.028), rgba(212, 208, 200, 0) 140px); }
.al-check, .al-bar, .way, .mint-panel, .deck-frame, .closed p, .mine .gate { background: var(--sheen); border: 1px solid var(--hair); }
.way:hover { border-color: var(--hair-2); }
.deck-tabs, .deck-text, .deck-tabs button { border-color: var(--hair) !important; }
.phases { background: none; border: 1px solid var(--hair); gap: 0; }
.phase { background: none; }
.phases:not(.phases-col) .phase + .phase { border-left: 1px solid var(--hair); }
.phases-col .phase + .phase { border-top: 1px solid var(--hair); }
.phase.live { background: linear-gradient(180deg, rgba(0, 229, 255, 0.06), transparent 80%); }
ul.friends { background: none; border: 0; gap: 0.5rem; }
ul.friends li { background: none; border: 1px solid var(--hair); }
.way.way-relic { background: none; }
.relic-art::after { background: linear-gradient(to bottom, transparent, var(--bg)); }
.al-tier { border-color: var(--hair-2); }

/* ══ Premint layout: one 12-column frame. The eligibility panel spans the full width (= ways + windows);
   below it the ways and the mint windows share the same outer edges. ══ */
.al { gap: 1.4rem; }
.al-grid { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); gap: 1.4rem; }
.al-check { justify-self: stretch; width: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "intro in" "safe safe" "err err"; align-items: center; gap: 0.6rem 2rem; padding: 1.6rem 1.8rem 1.3rem; text-align: left; }
.al-intro { grid-area: intro; }
.al-in { grid-area: in; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }
.al-check .al-safe { grid-area: safe; margin: 0.4rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--hair); max-width: none; }
.al-check .al-err { grid-area: err; margin: 0; }
.al-kicker { margin: 0 0 0.35rem; font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.al-check h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: 0.06em; text-transform: none; }
.al-or { font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.al-paste { display: flex; align-items: stretch; min-width: 0; }
.al-paste input { width: 21rem; max-width: 100%; min-width: 0; height: 48px; padding: 0 0.9rem; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--hair-2); border-right: 0; color: var(--text); font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.02em; }
.al-paste input::placeholder { color: var(--muted); }
.al-paste input:focus { outline: none; border-color: var(--accent); }
.al-paste .btn { height: 48px; border-color: var(--hair-2); }
.al-in .mint-btn { height: 48px; min-width: 0; font-size: 0.92rem; letter-spacing: 0.2em; text-indent: 0.2em; padding: 0 1.4rem; }
/* status bar after an address is known */
.al-bar { grid-template-columns: minmax(10rem, auto) minmax(0, 1fr) auto; padding: 1.1rem 1.4rem; gap: 0.6rem 1.8rem; }
.al-id { display: flex; flex-direction: column; gap: 0.5rem; }
.al-bar .al-who { display: flex; flex-direction: column; gap: 0.15rem; }
.al-bar .al-who span { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.al-bar .al-who b { font-weight: 400; color: var(--text); letter-spacing: 0.04em; }
.al-alt { margin: 0; font-size: 0.78rem; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--body); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--accent); }
/* the "where should your spot go?" prompt over the game */
.relic-ask { width: min(30rem, calc(100vw - 32px)); border: 1px solid var(--hair-2); background: var(--surface); color: var(--text); padding: 1.8rem 1.6rem 1.4rem; display: grid; gap: 0.8rem; justify-items: center; text-align: center; }
.relic-ask::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.relic-ask h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.04em; }
.relic-ask p { margin: 0; color: var(--body); }
.relic-ask .al-paste { width: 100%; }
.relic-ask .al-paste input { flex: 1; width: auto; }
.relic-ask .mint-btn { height: 48px; font-size: 0.92rem; letter-spacing: 0.2em; text-indent: 0.2em; min-width: 14rem; }
.relic-ask .relic-x { margin-top: 0.3rem; }

@media (max-width: 860px) {
  .al-check { grid-template-columns: 1fr; grid-template-areas: "intro" "in" "safe" "err"; text-align: left; padding: 1.4rem 1.2rem 1.1rem; }
  .al-in { justify-content: stretch; flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .al-in .mint-btn { width: 100%; max-width: none; }
  .al-or { text-align: center; }
  .al-paste input { width: auto; flex: 1; }
  .al-bar { grid-template-columns: 1fr; }
  .al-grid { grid-template-columns: 1fr; }
}

/* Mint windows: a quieter, filled side panel (no outlines of its own), so it reads as reference information
   beside the ways onto the list rather than another set of competing cards. */
.al-windows { background: rgba(212, 208, 200, 0.035); padding: 1.1rem 1.2rem 0.6rem; }
.al-windows h3 { margin-bottom: 0.5rem; }
.al-windows .phases { border: 0; }
.al-windows .phase { padding: 0.85rem 0; }
.al-windows .phases-col .phase + .phase { border-top: 1px solid rgba(212, 208, 200, 0.07); }
.al-windows .phase b { font-size: 1rem; color: var(--body); }
.al-windows .ph-who, .al-windows .ph-time { font-size: 0.78rem; }
.al-windows .phase.live { background: none; box-shadow: inset 2px 0 0 var(--accent); padding-left: 0.8rem; }
.al-windows .phase.live b { color: var(--text); }

/* ══ Page flow, 2026-10-31 (third pass): fewer competing details, one clear path.
   Hero: title, one paragraph, one line about WAVEFORMS, a facts strip; the 3D view with only a quiet Regenerate.
   Premint: (1) Find the Relic, the main call to action, full width; (2) Check eligibility with how to qualify
   underneath; (3) Mint windows as a quiet side panel. ══ */

/* hero copy */
.copy .lede { font-size: 1.12rem; line-height: 1.6; color: var(--text); margin: 0 0 1.2rem; }
.copy .pass { border: 0; padding: 0; margin: 0 0 1.6rem !important; color: var(--body); }
.copy .pass strong { color: var(--text); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; }
ul.facts { list-style: none; margin: 0; padding: 0.9rem 0 0; border-top: 1px solid var(--hair, #222); display: flex; flex-wrap: wrap; gap: 0.4rem 0; font-family: var(--font-display); font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--body); }
ul.facts li { padding: 0 1.1rem; border-left: 1px solid var(--hair-2, #333); }
ul.facts li:first-child { padding-left: 0; border-left: 0; color: var(--text); }
/* the 3D view: only a quiet regenerate under it */
.hero-bar { margin-top: 0.4rem; gap: 0; }
.hero-regen { background: none; border: 1px solid var(--hair-2, #333); color: var(--body); font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.45rem 0.9rem; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.hero-regen:hover { color: var(--text); border-color: var(--body); }

/* (1) Find the Relic */
.al { gap: 1.4rem; padding-bottom: 5rem; }
.relic-feature { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; border: 1px solid var(--hair); background: var(--sheen); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.relic-feature .relic-art { height: clamp(260px, 30vw, 380px); background: radial-gradient(60% 70% at 50% 55%, rgba(124, 98, 214, 0.2), transparent 70%), radial-gradient(40% 50% at 30% 62%, rgba(236, 160, 98, 0.12), transparent 70%); }
.relic-feature .relic-art img { width: 112%; -webkit-mask-image: radial-gradient(75% 80% at 50% 48%, #000 55%, transparent 100%); mask-image: radial-gradient(75% 80% at 50% 48%, #000 55%, transparent 100%); }
.relic-feature .relic-art::after { display: none; }
.relic-feature .relic-body { margin: 0; padding: 2rem 2.2rem 2rem 0.5rem; display: grid; gap: 0.9rem; justify-items: start; }
.relic-feature .al-kicker { display: flex; align-items: center; gap: 0.7rem; margin: 0; }
.relic-feature h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.3vw, 1.95rem); line-height: 1.2; letter-spacing: 0.02em; color: var(--text); }
.relic-feature h3 em { font-style: normal; color: var(--accent); }
.relic-feature p { margin: 0; color: var(--body); max-width: 40ch; }
.relic-feature p strong { color: var(--text); font-family: var(--font-display); font-weight: 400; letter-spacing: 0.06em; }
.relic-feature .relic-cta { margin-top: 0.3rem; }
.relic-feature.focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 70px rgba(124, 98, 214, 0.16); }
.relic-feature .next { font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 0.2rem 0.5rem; }
.relic-feature:hover .relic-art img { transform: translate(-50%, -51%) scale(1.02); }

/* (2) + (3) */
.al-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); gap: 1.4rem; align-items: stretch; }
.al-elig { border: 1px solid var(--hair); background: var(--sheen); padding: 1.6rem 1.8rem; display: grid; gap: 1.3rem; align-content: start; }
.al-elig .al-check, .al-elig .al-bar { border: 0; background: none; padding: 0; }
.al-elig .al-check { display: grid; gap: 0.9rem; grid-template-columns: none; grid-template-areas: none; text-align: left; }
.al-elig .al-check h3, .qualify h4 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.06em; color: var(--text); }
.al-elig .al-in { justify-content: flex-start; }
.al-elig .al-bar { grid-template-columns: minmax(9rem, auto) minmax(0, 1fr); }
.al-elig .al-bar .al-act { grid-column: 1 / -1; justify-content: flex-start; }
.qualify { border-top: 1px solid var(--hair); padding-top: 1.2rem; display: grid; gap: 0.8rem; }
.qualify h4 { font-size: 0.86rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--body); }
.qualify h4 span { margin-left: 0.6rem; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: none; color: var(--muted); }
.qualify ol { list-style: none; counter-reset: q; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.qualify > ol > li { counter-increment: q; position: relative; padding: 0.7rem 0 0.7rem 2.2rem; border-left: 2px solid transparent; transition: border-color 0.2s; }
.qualify > ol > li::before { content: counter(q); position: absolute; left: 0.6rem; top: 0.72rem; font-family: var(--font-display); font-size: 0.8rem; color: var(--muted); }
.qualify > ol > li b { font-weight: 400; color: var(--text); margin-right: 0.5rem; }
.qualify > ol > li > p { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--body); }
.qualify > ol > li > .tier-tag { vertical-align: 0.1em; }
.qualify > ol > li.focus { border-left-color: var(--accent); }
.qualify ul.friends { margin-top: 0.6rem; }
.qualify .al-safe { margin: 0.2rem 0 0; }
.al-windows { align-self: start; }

@media (max-width: 860px) {
  .relic-feature { grid-template-columns: 1fr; }
  .relic-feature .relic-art { height: clamp(200px, 56vw, 300px); }
  .relic-feature .relic-body { padding: 0 1.2rem 1.4rem; }
  .al-row { grid-template-columns: 1fr; }
  .al-elig { padding: 1.3rem 1.1rem; }
  .al-elig .al-bar { grid-template-columns: 1fr; }
}
.al-elig .al-check > *, .al-elig .al-in, .al-elig .al-safe, .al-elig .al-err { grid-area: auto; }
.al-elig .al-check { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 860px) {
  .qualify h4 span { display: block; margin: 0.3rem 0 0; }
  .qualify > ol > li { padding-left: 1.7rem; }
  .qualify > ol > li::before { left: 0.3rem; }
}
.qualify ul.friends { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.qualify ul.friends li { padding: 0.55rem 0.7rem; }

/* ── Gallery title: the "how it's built" link replaces the stats strip (2026-10-31) ── */
.gal-title { display: flex; flex-direction: column; gap: 0.35rem; }
.gal-sub { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.95rem; color: var(--body); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.25em; cursor: pointer; }
.link-btn:hover, .link-btn:focus-visible { color: var(--accent); }
.link-btn::after { content: ' →'; color: var(--accent); }

/* ── Inside ROLU Studio pop-out ── */
.studio-pop { width: min(1240px, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 1px solid var(--hair-2, var(--border2)); background: var(--bg); color: var(--text); overflow: auto; overscroll-behavior: contain; }
.studio-pop::backdrop { background: rgba(4, 4, 4, 0.78); backdrop-filter: blur(3px); }
.studio-pop .deck { padding: 1.6rem 1.8rem 1.8rem; }
.studio-pop .deck-head { position: relative; padding-right: 7rem; }
.studio-x { position: absolute; top: 0; right: 0; background: none; border: 1px solid var(--border2); color: var(--text); font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.5rem 0.8rem; cursor: pointer; }
.studio-x:hover, .studio-x:focus-visible { border-color: var(--accent); color: var(--accent); }
html.pop-open { overflow: hidden; }
@media (max-width: 760px) {
  .studio-pop { width: 100vw; max-height: 100dvh; height: 100dvh; border: 0; }
  .studio-pop .deck { padding: 1rem 1rem 1.4rem; }
  .studio-pop .deck-head { padding-right: 0; padding-top: 2.6rem; }
}

/* ── Loading skeletons (2026-10-31) ──
   Shown from the first paint, replaced as the data arrives, so nothing jumps and nothing looks empty. */
.skel { display: block; background: linear-gradient(90deg, #141414 0%, #1d1d1d 45%, #141414 90%) 0 0 / 300% 100%; animation: skel 1.6s ease-in-out infinite; border-radius: 2px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.skel-line { height: 0.72em; margin: 0.35em 0; width: 72%; }
.skel-line.short { width: 44%; }
.skel-tile { pointer-events: none; }
.skel-tile .img.skel { border-radius: 0; }
.skel-tile .meta { padding: 0.75rem 0.8rem 0.9rem; }
.skel-chip { width: 9rem; height: 1.6em; list-style: none; }
.phases .skel-phase { list-style: none; padding: 0.9rem 0; border-bottom: 1px solid var(--hair, var(--border)); }
.mint-btn.is-loading { opacity: 0.55; }

/* Hero: a bell-jar outline until the first mesh is drawn, then the piece shown softened ("developing")
   while the full-resolution mesh is built. */
.hero-skel { position: absolute; inset: 14% 22% 10%; width: 56%; height: 76%; fill: none; stroke: var(--border2); stroke-width: 1.2; vector-effect: non-scaling-stroke; animation: skelPulse 1.4s ease-in-out infinite alternate; pointer-events: none; transition: opacity 0.5s ease; }
@keyframes skelPulse { from { opacity: 0.35; } to { opacity: 0.9; } }
.stage.ready .hero-skel { opacity: 0; animation: none; }
.stage canvas { transition: filter 0.9s ease, opacity 0.5s ease; }
.stage.refining.ready canvas { filter: blur(5px) saturate(0.85); }
@media (prefers-reduced-motion: reduce) { .skel, .hero-skel { animation: none; } }

/* ── Hero + gallery as one opening (2026-11-02) ── */
/* Two next steps under the facts: the primary one solid, the second an outline. */
.ctas { list-style: none; display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 2rem 0 0; padding: 0; }
.cta { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 46px; padding: 0.7rem 1.05rem; border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease; }
.cta i { font-style: normal; transition: transform 0.2s ease; }
.cta:hover, .cta:focus-visible { background: var(--accent-dim); outline: none; }
.cta:hover i, .cta:focus-visible i { transform: translateX(4px); }
.ctas li:first-child .cta { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.ctas li:first-child .cta:hover { background: #5ff0ff; }
.cta[hidden] { display: none; }

/* Gallery straight under the hero: a slim toolbar on the right, then the grid. */
.gallery { padding-top: 0.4rem; }
.gal-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin: 0 0 1rem; flex-wrap: wrap; }
.gal-bar .seg:empty { display: none; }
.gal-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.gal-btn { min-height: 36px; padding: 0.4rem 0.9rem; font-size: 0.74rem; letter-spacing: 0.12em; }
.gal-btn.on { border-color: var(--accent); color: var(--accent); }
.gal-btn .fcount { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 0.3em; background: var(--accent); color: var(--accent-ink); font-size: 0.7rem; border-radius: 99px; }
.gal-btn .chev { width: 0.4em; height: 0.4em; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-0.15em) rotate(45deg); transition: transform 0.2s ease; }
.gal-btn[aria-expanded=true] .chev { transform: translateY(0.1em) rotate(-135deg); }
.gal-details { border-color: var(--hair-2, var(--border2)); }
.gal-filter { position: relative; }
.filter-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(360px, calc(100vw - 2rem)); max-height: min(70vh, 560px); overflow: auto; overscroll-behavior: contain; padding: 0.4rem 1rem 0.8rem; background: #0e0e0e; border: 1px solid var(--border2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); animation: pop 0.16s ease; }
.filter-pop[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.filter-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; position: sticky; top: -0.4rem; padding: 0.7rem 0 0.5rem; background: #0e0e0e; z-index: 1; }
.filter-head b { font-family: var(--font-display); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--body); }
.gallery .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.tile { transition: border-color 0.2s ease, transform 0.2s ease; }
.tile:hover { transform: translateY(-2px); }
.tile[aria-current=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tile .meta { padding: 0.6rem 0.75rem 0.7rem; }
.tile .meta span { color: var(--text); font-size: 0.84rem; white-space: normal; overflow: visible; line-height: 1.35; }
@media (max-width: 760px) {
  .gallery .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .gal-tools { width: 100%; }
  .gal-tools > * { flex: 1 1 0; }
  .gal-tools .gal-btn { width: 100%; justify-content: center; }
  .filter-pop { position: fixed; left: 1rem; right: 1rem; top: auto; bottom: 1rem; width: auto; max-height: 70vh; }
  .ctas { flex-direction: column; align-items: stretch; }
  .cta { display: flex; width: 100%; box-sizing: border-box; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .tile, .cta i, .filter-pop { transition: none; animation: none; } .tile:hover { transform: none; } }

/* Details pop-out: the hero piece large, with its traits. */
.details-pop { width: min(1180px, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 1px solid var(--hair-2, var(--border2)); background: var(--bg); color: var(--text); overflow: hidden; }
.details-pop::backdrop { background: rgba(4, 4, 4, 0.78); backdrop-filter: blur(3px); }
.dt { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); height: min(820px, calc(100dvh - 2rem)); }
.dt-stage { position: relative; height: 100%; min-height: 0; background: var(--surface); }
.dt-stage canvas, .dt-stage .plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dt-stage .plate { pointer-events: none; }
/* Dragging on the 3D view turns it; it must never start a page scroll (on phones that cancelled the turn). */
.dt-stage canvas { cursor: grab; touch-action: none; }
.dt-stage canvas:active { cursor: grabbing; }
.dt-busy { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 0.9rem; color: var(--body); text-align: center; }
.dt-side { overflow-y: auto; padding: 3.6rem 2rem 2rem; border-left: 1px solid var(--border); }
.dt-side h2 { margin: 0 0 0.5rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: 0.04em; }
.dt-sub { margin: 0 0 1.2rem; color: var(--body); font-size: 0.92rem; }
.dt-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dt-actions .btn { min-height: 38px; font-size: 0.74rem; }
.dt-rare { margin: 1.5rem 0 0.8rem; padding-top: 1.1rem; border-top: 1px solid var(--border); color: var(--body); font-size: 0.88rem; }
.details-pop .traits { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.35rem 1rem; margin: 0; font-size: 0.88rem; }
.details-pop .traits dt { color: var(--muted); }
.details-pop .traits dd { margin: 0; color: var(--text); }
.details-pop .traits dd.p { font-family: var(--font-display); font-size: 0.76rem; color: var(--muted); text-align: right; align-self: center; }
.details-pop .traits dd.rare { color: var(--warn); }
.dt-meta { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }
.dt-meta p { margin: 0 0 0.6rem; }
.dt-meta a { color: var(--body); }
.dt-meta code { font-family: var(--font-display); color: var(--body); word-break: break-all; }
.dt-x { position: absolute; top: 1rem; right: 1rem; z-index: 2; background: var(--bg); }
@media (max-width: 860px) {
  .details-pop { width: 100vw; max-height: 100dvh; height: 100dvh; border: 0; overflow-y: auto; }
  .dt { grid-template-columns: 1fr; height: auto; }
  .dt-stage { height: auto; aspect-ratio: 1; }
  .dt-side { border-left: 0; border-top: 1px solid var(--border); padding: 1.4rem 1rem 2rem; overflow: visible; }
}

/* ── 2026-11-02 round ── */
.al-kicker:empty, .relic-note:empty { display: none; }
ul.friends b { font-weight: 400; color: var(--text); }
.friends-more { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.82rem; }
.al-safe-wide { max-width: none; margin: 1.4rem 0 0; padding-top: 1rem; border-top: 1px solid var(--hair, var(--border)); }

/* Gallery: six across on a full desktop, the name over the bottom of each picture on a black fade. */
.gallery .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.8rem; }
@media (max-width: 1240px) { .gallery .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .gallery .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gallery .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; } }
.gallery .tile { position: relative; overflow: hidden; }
.gallery .tile .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem 0.75rem 0.65rem; background: linear-gradient(to top, rgba(8, 8, 8, 0.92) 0%, rgba(8, 8, 8, 0.7) 45%, rgba(8, 8, 8, 0) 100%); pointer-events: none; }
.gallery .tile .meta span { display: block; color: #f1ede4; font-size: 0.82rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.gallery .skel-tile .meta { background: none; }

/* Under the hero: the piece's name on the left, "Full 3D view" on the right (2026-11-02). */
.hero-bar { margin-top: 0.5rem; }
.hero-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding-top: 0.6rem; border-top: 1px solid var(--hair, var(--border)); }
.hero-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); }
.hero-full { flex: none; display: inline-flex; align-items: center; gap: 0.55rem; background: none; border: 1px solid var(--hair-2, var(--border2)); color: var(--text); font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.5rem 0.85rem; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.hero-full svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.2s ease; }
.hero-full:hover, .hero-full:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.hero-full:hover svg, .hero-full:focus-visible svg { transform: scale(1.15); }
.grid-more { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.grid-more .btn[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .hero-full svg { transition: none; } }
/* Friends collections: names only, as chips that size to their name (2026-11-03). */
.qualify ul.friends { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.qualify ul.friends li { display: block; padding: 0.45rem 0.75rem; white-space: nowrap; }
.qualify ul.friends li b { font-size: 0.88rem; }
