:root {
  --bg: #0B0B0C; --ink: #F6F4EF; --sub: rgba(246, 244, 239, .58); --dim: rgba(246, 244, 239, .38);
  --line: rgba(246, 244, 239, .1); --line2: rgba(246, 244, 239, .2); --glass: rgba(246, 244, 239, .045);
  --sans: 'Bricolage Grotesque', system-ui, sans-serif; --serif: 'Instrument Serif', Georgia, serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --holo: linear-gradient(90deg, #7DF0FF, #A98BFF, #FF7CC8, #FFB46E, #FFE89A, #9BFFD0);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100svh; font: 400 16px/1.5 var(--sans); display: flex; flex-direction: column; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--bg); }

/* the map behind everything */
#bgmap { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; opacity: .34; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 10%, #000 85%); mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 10%, #000 85%);
  animation: shimmer 40s linear infinite; transition: opacity .6s; }
body[data-view="result"] #bgmap { opacity: .12; }
body[data-view="scan"] #bgmap { opacity: .22; }
@keyframes shimmer { to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #bgmap { animation: none; } }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(18px, 4vw, 40px); position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.brand i { font: italic 400 21px var(--serif); color: var(--sub); }
.top-right { display: flex; align-items: center; gap: 10px; }
.coin { font: 600 13px var(--mono); letter-spacing: .04em; text-decoration: none; padding: 9px 15px; border-radius: 99px; border: 1px solid var(--line2);
  background: var(--glass); backdrop-filter: blur(10px); transition: background .2s, border-color .2s; }
.coin:hover { background: rgba(246, 244, 239, .1); border-color: rgba(246, 244, 239, .35); }
.me { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 4px; border-radius: 99px; border: 1px solid var(--line2); background: var(--glass); font-weight: 600; font-size: 14px; }
.menu { position: absolute; right: clamp(18px, 4vw, 40px); top: 66px; min-width: 170px; padding: 6px; border-radius: 14px; background: #161617; border: 1px solid var(--line2); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); display: flex; flex-direction: column; }
.menu a, .menu button { text-align: left; padding: 10px 12px; border-radius: 9px; border: 0; background: none; text-decoration: none; font-size: 14.5px; font-weight: 500; }
.menu a:hover, .menu button:hover { background: rgba(246, 244, 239, .07); }

main { flex: 1; }

/* sign in buttons */
.signin { display: inline-flex; align-items: center; justify-content: center; gap: 11px; border: 0; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 700; transition: transform .15s, background .2s; }
.signin svg { width: 19px; height: 19px; }
.signin:hover { background: #fff; }
.signin:active { transform: scale(.97); }
.signin.big { height: 62px; padding: 0 32px; font-size: 18px; }
.signin.sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* hero */
.hero { min-height: calc(100svh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px 60px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; font: 500 12.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sub); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(246, 244, 239, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(246, 244, 239, 0); } }
h1 { margin: 0; font-weight: 800; font-size: clamp(54px, 9.6vw, 142px); line-height: .9; letter-spacing: -.05em; }
h1 em, h2 em { font: italic 400 1.12em/0.85 var(--serif); letter-spacing: -.02em; }
.lede { max-width: 520px; margin: 28px auto 34px; font-size: clamp(16px, 1.6vw, 19px); color: var(--sub); line-height: 1.5; }
.field { display: flex; align-items: center; width: min(420px, 100%); height: 52px; margin-top: 16px; padding: 5px 5px 5px 18px; border-radius: 99px; background: rgba(20, 20, 21, .72); border: 1px dashed var(--line2); }
.at { font: 500 18px var(--mono); color: var(--dim); margin-right: 4px; }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.field button { height: 42px; padding: 0 18px; border: 1px solid var(--line2); border-radius: 99px; background: var(--glass); font-weight: 600; }
.err { min-height: 22px; margin: 16px 0 0; color: #FF9C7A; font-size: 15px; }
.fine { margin: 6px 0 0; font: 400 12.5px/1.6 var(--mono); color: var(--dim); max-width: 440px; }
.fine b { color: var(--ink); font-weight: 600; }

/* wall */
.wall { max-width: 1240px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 40px) 80px; }
.wall-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.wall h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
.wall h2 span { font: 500 14px var(--mono); color: var(--dim); letter-spacing: 0; margin-left: 6px; }
.wall-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wall-tools input { height: 40px; width: 200px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line2); background: var(--glass); outline: 0; font-size: 14px; }
.wall-tools input:focus { border-color: rgba(246, 244, 239, .45); }
.tabs { display: flex; padding: 4px; gap: 2px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass); }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--sub); }
.tabs button.on { background: var(--ink); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: 46px 1fr; column-gap: 13px; row-gap: 3px; padding: 16px; border-radius: 18px; text-decoration: none;
  background: rgba(20, 20, 21, .7); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.tile:hover { border-color: rgba(246, 244, 239, .32); transform: translateY(-2px); }
.tile .ava { grid-row: 1 / 3; width: 46px; height: 46px; }
.tile-name { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tile-name b { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-name i { font: 400 13px var(--mono); color: var(--dim); font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.tile-tag { justify-self: start; font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line2); color: var(--sub); }
.tile-num { grid-column: 1 / 3; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.tile-num b { color: var(--ink); font-weight: 700; margin-left: 2px; }
.tile-num b:nth-of-type(2) { margin-left: 10px; }
.empty { color: var(--dim); }
.pages { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.pages button { min-width: 40px; height: 40px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass); font-size: 14px; font-weight: 600; }
.pages button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pages button:disabled { opacity: .3; cursor: default; }
.pages span { color: var(--dim); padding: 0 4px; }

/* avatars */
.ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #1c1c1e; flex: none; display: block; }
.ava.sm { width: 30px; height: 30px; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* scanning */
.scan { min-height: calc(100svh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px 60px; }
.scan-who { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.scan-who .ava { width: 92px; height: 92px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line2); }
.scan-who .eyebrow { margin: 0; }
.scan-num { margin-top: 14px; display: flex; flex-direction: column; align-items: center; }
.scan-num span { font-weight: 800; font-size: clamp(84px, 17vw, 210px); line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.scan-num small { font: italic 400 30px var(--serif); color: var(--sub); margin-top: -4px; }
.scan-row { display: flex; gap: 44px; margin: 30px 0 34px; }
.scan-row div { display: flex; flex-direction: column; }
.scan-row b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.scan-row span { font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.bar { width: min(460px, 86vw); height: 4px; border-radius: 9px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--holo); background-size: 200% 100%; transition: width .6s ease; animation: slide 2.4s linear infinite; }
@keyframes slide { to { background-position: -200% 0; } }
.scan-note { font: 400 12.5px var(--mono); color: var(--dim); margin: 16px 0 0; max-width: 560px; }

/* result: one card at a time */
#result { padding: 0 0 80px; }
.stage-head { text-align: center; padding: 6px 20px 0; }
.stage-head .eyebrow { margin: 0 0 10px; }
.stage-head h2 { margin: 0; font-size: clamp(30px, 4.4vw, 54px); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.stage-wrap { --w: min(460px, 88vw, calc((100svh - 300px) * .8)); position: relative; width: var(--w); margin: 26px auto 0; }
.stage { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); border: 1px solid var(--line); background: #141415; }
.stage::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; }
.slide canvas { display: block; width: 100%; height: 100%; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(11, 11, 12, .7);
  backdrop-filter: blur(8px); display: grid; place-items: center; transition: background .2s; }
.nav:hover { background: rgba(40, 40, 42, .9); }
.nav svg { width: 20px; height: 20px; }
.nav.prev { left: -70px; } .nav.next { right: -70px; }
.dots { display: flex; justify-content: center; gap: 7px; margin: 18px 0 0; }
.dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 9px; background: var(--line2); transition: all .25s; }
.dots button.on { width: 22px; background: var(--ink); }
.act { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 24px auto 0; padding: 0 20px; }
.btn { white-space: nowrap; height: 52px; padding: 0 26px; border-radius: 99px; border: 1px solid var(--line2); background: var(--glass); font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, border-color .2s, transform .15s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: rgba(246, 244, 239, .1); border-color: rgba(246, 244, 239, .36); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: #fff; }
.btn.icon { width: 52px; padding: 0; }
.looks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 18px auto 0; padding: 0 20px; }
.sw { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line2); position: relative; transition: transform .15s; }
.sw:hover { transform: scale(1.1); }
.sw.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.sw.busy { animation: spin 1s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sw-color { background: conic-gradient(#2B45FF 0 25%, #FF5C26 0 50%, #6C3BFF 0 75%, #FF6FAE 0); }
.sw-black { background: #0B0B0C; box-shadow: inset 0 0 0 5px #0B0B0C, inset 0 0 0 7px rgba(169, 139, 255, .8); }
.sw-black.on { box-shadow: inset 0 0 0 5px #0B0B0C, inset 0 0 0 7px rgba(169, 139, 255, .8), 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.sw-bone { background: #EFEBE2; }
.sw-header { background: linear-gradient(135deg, #3a4b6b, #8a6d5a); }
.sw-ai { background: conic-gradient(#7DF0FF, #A98BFF, #FF7CC8, #FFB46E, #FFE89A, #9BFFD0, #7DF0FF); }
.sw-upload { background: var(--glass); }
.sw-upload::before, .sw-upload::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); }
.sw-upload::after { transform: translate(-50%, -50%) rotate(90deg); }
.looks-note { width: 100%; text-align: center; font: 400 12px var(--mono); color: var(--dim); }

/* the numbers */
.stats { max-width: 1080px; margin: 70px auto 0; padding: 0 clamp(16px, 4vw, 40px); }
.stats h3 { margin: 0 0 18px; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.04em; }
.st { padding: 18px 18px 16px; border-radius: 18px; background: rgba(20, 20, 21, .75); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st span { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.st b { font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st i { font-style: normal; font-size: 13px; color: var(--sub); }
.st-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.st-big .st b { font-size: clamp(34px, 4.6vw, 54px); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.st-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 220px; margin-top: 10px; padding: 18px 18px 14px; border-radius: 18px; background: rgba(20, 20, 21, .75); border: 1px solid var(--line); }
.mo { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.mo i { width: 100%; border-radius: 6px 6px 3px 3px; background: rgba(246, 244, 239, .22); }
.mo em { font: 500 11px var(--mono); font-style: normal; color: var(--dim); }
.mo span { font: 500 11px var(--mono); color: var(--dim); text-transform: uppercase; }
.mo.on i { background: var(--holo); }
.mo.on em, .mo.on span { color: var(--ink); }
.st-pair { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; margin-top: 10px; }
.st-post, .st-list { padding: 18px; border-radius: 18px; background: rgba(20, 20, 21, .75); border: 1px solid var(--line); text-decoration: none; display: block; }
.st-post:hover { border-color: rgba(246, 244, 239, .3); }
.st-post span, .st-list > span { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.st-post p { margin: 10px 0 12px; font-size: 17px; line-height: 1.45; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.st-post i { font-style: normal; font-size: 13px; color: var(--sub); }
.st-list div { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-list div:last-child { border-bottom: 0; }
.st-list b { color: var(--dim); font-weight: 800; width: 14px; }
.st-list a { flex: 1; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.st-list em { font: 500 13px var(--mono); font-style: normal; color: var(--sub); }
.st-list p { color: var(--dim); margin: 10px 0 0; }

/* footer + toast */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 22px clamp(18px, 4vw, 40px); font: 400 12px var(--mono); color: var(--dim); border-top: 1px solid var(--line); }
.copy { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline dotted; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 10; padding: 13px 20px; border-radius: 99px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px; transition: all .3s; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .nav { display: none; }
  .st-big { grid-template-columns: repeat(2, 1fr); }
  .st-pair { grid-template-columns: 1fr; }
  .st-months { gap: 4px; padding: 14px 10px 10px; }
  .mo em { display: none; }
}
@media (max-width: 600px) {
  .coin { display: none; }
  .me #meName { display: none; }
  .me { padding: 0 4px; }
  .act .btn.primary { flex: 1; }
}
