/* Mew Club MC - whitelist + admin. One stylesheet, tokens shared with pro.css. */
:root {
  --ease: cubic-bezier(.2,.8,.2,1);
  --mono: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
img { max-width: 100%; display: block; }
a { text-underline-offset: 3px; }
:focus-visible { border-radius: 8px; }
.wrap { margin: 0 auto; padding: 0 20px; }

.hidden { display: none !important; }
.center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; padding: 12px 0 0; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 28px);
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav-actions { display: flex; flex: none; }

/* ---------- buttons ---------- */
.btn {
  gap: 8px;
  font: 700 15px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
}

.btn:disabled, .btn[disabled] { cursor: not-allowed; }

.btn-block { width: 100%; }
.btn-outline { border-color: var(--line-2); }

.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.mint-btn { gap: 10px; padding: 16px 16px; min-height: 60px; }
.mint-btn-icon { border-radius: 50%; object-fit: cover; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.25); border-top-color: #ffffff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero ---------- */

.hero-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-soft); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(232, 200, 119,.55); } 70% { box-shadow: 0 0 0 9px rgba(232, 200, 119,0); } 100% { box-shadow: 0 0 0 0 rgba(232, 200, 119,0); } }


.form-note { font-size: 13px; color: var(--muted); }
.hero > .wrap > .form-note { margin: 0 0 18px; }

/* slider */
.hero-slider {
  position: relative; overflow-x: auto; margin: 0 0 26px; padding: 6px 0 34px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hero-slider::-webkit-scrollbar { display: none; }
.slider-track { display: flex; width: max-content; animation: slide-ltr 160s linear infinite; will-change: transform; }
.slide-card { flex: none; overflow: hidden; }
.slide-card img { width: 100%; height: 100%; object-fit: cover; }
@keyframes slide-ltr { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* countdown + status */
.countdown { display: grid; }
.cell, .panel, .faq-item, .info-cell, .agent-log {
  box-shadow: 0 26px 60px -34px rgba(0,0,0,.9);
}

.agent-log { text-align: left; }

.agent-log-row { display: flex; justify-content: space-between; }

.agent-log-row span { color: var(--muted); }

.progress-fill { transition: width .6s var(--ease); }
.progress-fill::after { inset: 0; }
@keyframes shimmer { to { transform: translateX(100%); } }


.step-tabs a { display: flex; align-items: center; text-decoration: none; line-height: 1.1; text-align: center; transition: color .2s, background .2s, border-color .2s, transform .15s; }
.step-tabs a:active { transform: scale(.97); }
.step-tabs a.active { color: var(--text); }
.step-icon { display: grid; place-items: center; font-weight: 800; }

/* ---------- sections + panels ---------- */

.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.section-heading-row .section-heading { margin-bottom: 0; }
.section-mascot img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.mascot-crown { display: block; text-align: center; font-size: 18px; }
.panel { padding: 24px; }

.panel p strong { color: var(--text); }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
.info-cell { color: inherit; text-decoration: none; }
.info-num { font-size: clamp(24px, 5vw, 32px); }
.info-h { margin: 0 0 6px; }


/* how it works + distribution */
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; align-content: start; padding: 16px; }
.steps .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 14px; }
.dist-bar { display: flex; margin: 6px 0 16px; }

.dist-key { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.dist-key li::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--c); }
.dist-key b { color: var(--text); }

/* tasks */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 12px; transition: border-color .2s, background .2s; }
.task-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.task-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(212, 168, 75,.14); color: var(--primary-soft); font-weight: 800; font-size: 12px; }
.task-icon-x { background: #000; color: #fff; border: 1px solid rgba(255,255,255,.28); }
.task-icon-x svg { width: 18px; height: 18px; }
.task.done .task-icon-x { border-color: rgba(var(--ok-rgb), .7); }

/* form */
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
input:not([type=checkbox]):not([type=file]), select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  color: var(--text);
  font: 15px var(--font);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { outline: none; }
.field .hint { margin-top: 6px; font-size: 13px; }
.field .error { display: none; margin-top: 6px; font-size: 13px; color: var(--danger); }
.field.has-error input { border-color: var(--danger); }
.field.has-error .error { display: block; }
.consent { display: flex; gap: 10px; margin: 4px 0 18px; font-size: 13px; color: var(--muted); }
.consent input { width: auto; margin-top: 3px; accent-color: var(--primary); }
.form-message { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 16px; font-size: 14px; }
.form-message.show { display: block; }
.form-message.error { background: rgba(229, 120, 109,.1); border: 1px solid var(--danger); color: var(--danger); }
.form-message.success { background: rgba(var(--ok-rgb), .09); border: 1px solid rgba(var(--ok-rgb), .5); color: var(--ok); }

/* lock state */
.locked-panel { position: relative; }
.locked-panel > .lock-overlay { display: none; }
.locked-panel.is-locked > *:not(.lock-overlay) { pointer-events: none; user-select: none; }
.locked-panel.is-locked > .lock-overlay { display: flex; }
.lock-overlay { position: absolute; inset: 0; z-index: 5; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; }
.lock-overlay .lock-title { font-weight: 800; }
.lock-overlay .lock-title::before { content: ''; display: inline-block; width: 9px; height: 7px; margin-right: 8px; border-radius: 2px; }

/* ticket: notched stub ticket with perforated dividers */
.ticket {
  position: relative;
  margin: 0 auto;
}
.ticket-rim, .ticket-body { -webkit-mask-composite: source-in; mask-composite: intersect; }
.ticket-rim {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  -webkit-mask-image: radial-gradient(circle var(--notch) at 0 50%, transparent 98%, #000 100%), radial-gradient(circle var(--notch) at 100% 50%, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at var(--stub) 0, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at calc(100% - var(--stub)) 0, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at var(--stub) 100%, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at calc(100% - var(--stub)) 100%, transparent 98%, #000 100%);
  mask-image: radial-gradient(circle var(--notch) at 0 50%, transparent 98%, #000 100%), radial-gradient(circle var(--notch) at 100% 50%, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at var(--stub) 0, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at calc(100% - var(--stub)) 0, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at var(--stub) 100%, transparent 98%, #000 100%), radial-gradient(circle var(--pin) at calc(100% - var(--stub)) 100%, transparent 98%, #000 100%);
}
.ticket-body {
  position: relative;
  margin: var(--edge);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--stub) 1fr var(--stub);
  --n: calc(var(--notch) + var(--edge));
  --p: calc(var(--pin) + var(--edge));
  -webkit-mask-image: radial-gradient(circle var(--n) at calc(var(--edge) * -1) 50%, transparent 98%, #000 100%), radial-gradient(circle var(--n) at calc(100% + var(--edge)) 50%, transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(var(--stub) - var(--edge)) calc(var(--edge) * -1), transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(100% - var(--stub) + var(--edge)) calc(var(--edge) * -1), transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(var(--stub) - var(--edge)) calc(100% + var(--edge)), transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(100% - var(--stub) + var(--edge)) calc(100% + var(--edge)), transparent 98%, #000 100%);
  mask-image: radial-gradient(circle var(--n) at calc(var(--edge) * -1) 50%, transparent 98%, #000 100%), radial-gradient(circle var(--n) at calc(100% + var(--edge)) 50%, transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(var(--stub) - var(--edge)) calc(var(--edge) * -1), transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(100% - var(--stub) + var(--edge)) calc(var(--edge) * -1), transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(var(--stub) - var(--edge)) calc(100% + var(--edge)), transparent 98%, #000 100%), radial-gradient(circle var(--p) at calc(100% - var(--stub) + var(--edge)) calc(100% + var(--edge)), transparent 98%, #000 100%);
}
.ticket-stub { position: relative; }
.ticket-stub::before, .ticket-stub::after { content: ''; position: absolute; top: 18px; bottom: 18px; }
.ticket-stub:first-child::after { right: 0; }
.ticket-stub:last-child::before { left: 0; } .ticket-stub:last-child::after { display: none; }
.ticket-main { padding: 28px 12px; text-align: center; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ticket .stamp { font-size: 13px; font-weight: 800; }
.ticket .number { font-size: clamp(32px, 9.5vw, 64px); line-height: 1.05; }
.ticket .handle { font-family: var(--font); font-size: 15px; overflow-wrap: anywhere; }

/* faces + share */
.face-grid { display: grid; }
.face-card { position: relative; overflow: hidden; aspect-ratio: 1; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }

.face-card img { width: 100%; height: 100%; object-fit: cover; }
.face-card.selected { border-color: var(--primary-soft); }
.face-card .check { position: absolute; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.face-card.selected .check { display: flex; }
.share-card-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
#shareCanvas { width: 100%; }
.share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#walletMsg { max-width: 560px; margin: 8px auto 0; text-align: left; }

/* faq + footer */
.faq-item { margin-bottom: 10px; }
.faq-item summary { position: relative; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; transition: transform .2s var(--ease); }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { margin: 0; padding: 0 18px 18px; animation: faq-open .2s ease; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
footer { text-align: center; font-size: 13px; color: var(--muted); }
footer .socials { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; }

/* ---------- admin ---------- */
.admin-body { max-width: 1100px; }
.admin-login { max-width: 420px; margin: 60px auto; }
.admin-h3 { margin: 0 0 12px; font-size: 17px; }
table.admin-table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
table.admin-table th, table.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.admin-table th { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.admin-filters, .admin-stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.admin-stat-cards .card { padding: 14px; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--line); }
.admin-stat-cards .card .n { font-size: 22px; font-weight: 800; }
.admin-stat-cards .card .l { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 13px; }
.panel input[type=file] { width: 100%; color: var(--muted); }
.panel code { padding: 2px 6px; border-radius: 6px; background: var(--glass-2); font: 13px var(--mono); word-break: break-all; }
.admin-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.admin-kv:empty { display: none; }
.admin-kv dt { color: var(--muted); }
.admin-kv dd { margin: 0; word-break: break-all; }
.admin-pool { margin-bottom: 18px; }
.admin-pool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.admin-pill { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 800; color: var(--muted); }
.admin-pill.is-open { color: var(--primary-soft); border-color: rgba(232, 200, 119,.45); background: rgba(212, 168, 75,.1); }
.admin-pill.is-closed { color: var(--danger); border-color: rgba(229, 120, 109,.45); background: rgba(229, 120, 109,.08); }
.admin-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- wider screens + reduced motion ---------- */
@media (min-width: 720px) {
  .info-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-slider { overflow-x: auto; }
  /* The preview slider must always slide, even when the OS asks to reduce motion. */
  .slider-track { animation-name: slide-ltr !important; animation-duration: 160s !important; animation-iteration-count: infinite !important; animation-timing-function: linear !important; animation-play-state: running !important; }
}
