@font-face { font-family: 'BernTYGRA'; src: url('assets/fonts/BernTYGRA.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Biolilbert'; src: url('assets/fonts/Biolilbert-Rg.ttf') format('truetype'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Biolilbert'; src: url('assets/fonts/Biolilbert-It.ttf') format('truetype'); font-style: italic; font-display: swap; }

:root {
  --ink: #120610; --plum: #6B0E4E; --plum-deep: #2b0621; --crimson: #D42A5C; --crimson-deep: #8c1240;
  --teal: #4FD3C4; --teal-deep: #238b80; --orange: #FE8259; --pink: #FFB6E3; --cream: #FFF4DE;
  --text: #fff; --dim: rgba(255,255,255,.72); --faint: rgba(255,255,255,.48);
  --glass: rgba(50,10,38,.46); --glass-strong: rgba(50,10,38,.7);
  --stroke: rgba(255,255,255,.2); --stroke-2: rgba(255,255,255,.32); --hi: rgba(255,255,255,.14);
  --r-xl: 32px; --r-lg: 26px; --r-md: 20px; --r-sm: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 74px;
}
.defs { position: absolute; width: 0; height: 0; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--text); font-family: 'Biolilbert', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { position: relative; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; cursor: pointer; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }

h1, h2, h3, h4, .cap, .btn, .pill, .seg button, .tab span, .num { font-family: 'BernTYGRA', 'Biolilbert', sans-serif; text-transform: uppercase; letter-spacing: .02em; font-weight: normal; }

/* ============ background stage ============ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% -8%, rgba(212,42,92,.45), transparent 62%),
    radial-gradient(80% 50% at 95% 10%, rgba(79,211,196,.14), transparent 55%),
    radial-gradient(90% 70% at 5% 100%, rgba(255,182,227,.14), transparent 55%),
    linear-gradient(165deg, var(--plum) 0%, var(--plum-deep) 48%, var(--ink) 100%);
}
.bg::after { content: ''; position: absolute; inset: 0; background: url('assets/img/bg-diamond-purple.jpg') center/cover; opacity: .09; mix-blend-mode: screen; }
.bg-beam { position: absolute; top: -30%; width: 70vw; height: 160vh; left: 50%; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255,230,245,.2), rgba(255,230,245,0) 75%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(18px); opacity: .55; will-change: transform; }
.bg-beam.b1 { margin-left: -60vw; animation: sweep 14s var(--ease-io) infinite alternate; }
.bg-beam.b2 { margin-left: -10vw; animation: sweep2 17s var(--ease-io) infinite alternate; background: linear-gradient(180deg, rgba(160,255,245,.16), rgba(160,255,245,0) 75%); }
@keyframes sweep { from { transform: rotate(-24deg); } to { transform: rotate(12deg); } }
@keyframes sweep2 { from { transform: rotate(20deg); } to { transform: rotate(-16deg); } }
.bg-dust { position: absolute; inset: 0; background-image:
  radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.7), transparent 60%),
  radial-gradient(1.2px 1.2px at 78% 14%, rgba(255,230,245,.6), transparent 60%),
  radial-gradient(1.6px 1.6px at 64% 58%, rgba(255,255,255,.5), transparent 60%),
  radial-gradient(1.2px 1.2px at 30% 76%, rgba(160,255,245,.55), transparent 60%),
  radial-gradient(1.4px 1.4px at 88% 84%, rgba(255,255,255,.45), transparent 60%);
  animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .35; } to { opacity: .9; } }

/* ============ liquid glass (approximation of Apple's material on the web) ============ */
.glass-deep { position: relative; background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--stroke); box-shadow: 0 12px 34px rgba(0,0,0,.36), inset 0 1px 0 var(--hi); isolation: isolate; }
.glass-deep::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 36%, rgba(255,255,255,0) 66%, rgba(255,255,255,.08) 100%); }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--stroke); box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 1px 0 var(--hi); }
@media (prefers-reduced-transparency: reduce) { .glass, .glass-deep { background: rgba(43,6,33,.95); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* ============ views ============ */
#views { position: fixed; inset: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  padding: calc(var(--st) + 14px) 16px calc(var(--sb) + var(--tabbar-h) + 44px);
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out); }
.view.leaving { opacity: 0; transform: translateY(8px) scale(.99); pointer-events: none; }
.view.entering { opacity: 0; transform: translateY(10px); }
.view::-webkit-scrollbar { display: none; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 4px 16px; }
.head h1 { margin: 0; font-size: clamp(34px, 11vw, 46px); line-height: .92; text-shadow: 0 4px 30px rgba(212,42,92,.55); overflow-wrap: anywhere; }
.head p { margin: 8px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.35; max-width: 32ch; }
.score-chip { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: none; }
.score-chip .ava { width: 34px; height: 34px; }
.score-chip b { font-family: 'BernTYGRA'; font-size: 17px; line-height: 1; }
.score-chip small { display: block; font-size: 10px; color: var(--dim); }

.progress { margin: 0 4px 16px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--dim); margin-bottom: 8px; }
.progress-top b { font-family: 'BernTYGRA'; color: #fff; font-size: 15px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--pink)); box-shadow: 0 0 14px rgba(79,211,196,.6); transition: width 900ms var(--ease-out); }

/* segmented control with liquid highlight */
.seg { position: relative; display: flex; padding: 5px; border-radius: 999px; margin: 0 0 16px; }
.seg-hl { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 999px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep)); box-shadow: 0 6px 18px rgba(212,42,92,.5), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform 380ms var(--ease-drawer), width 380ms var(--ease-drawer); }
.seg button { position: relative; z-index: 1; flex: 1; border: none; background: none; color: var(--dim); padding: 11px 10px; font-size: 13px; transition: color 200ms ease; display: flex; align-items: center; justify-content: center; gap: 7px; }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { color: #fff; }

/* ============ route ============ */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.stop { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding-bottom: 12px; }
.stop .rail { position: relative; display: flex; justify-content: center; }
.stop .rail::after { content: ''; position: absolute; top: 44px; bottom: -14px; width: 3px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, rgba(255,244,222,.35) 0 6px, transparent 6px 11px); }
.stop:last-child .rail::after { display: none; }
.stop.is-done .rail::after { background: linear-gradient(180deg, var(--teal), rgba(79,211,196,.4)); box-shadow: 0 0 10px rgba(79,211,196,.6); }
.node { position: relative; z-index: 1; margin-top: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: 'BernTYGRA'; font-size: 13px; color: #fff; background: rgba(43,6,33,.9); border: 2px solid rgba(255,244,222,.5); }
.stop.is-open .node { border-color: var(--pink); box-shadow: 0 0 0 0 rgba(255,182,227,.6); animation: ping 2.2s var(--ease-out) infinite; }
.stop.is-done .node { background: var(--teal); border-color: var(--teal); color: #062521; }
.stop.is-done .node svg { width: 16px; height: 16px; }
.stop.is-closed .node, .stop.is-soon .node { opacity: .65; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,182,227,.55); } 80%, 100% { box-shadow: 0 0 0 12px rgba(255,182,227,0); } }

.stop-card { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 10px; border-radius: var(--r-lg);
  transition: transform 160ms var(--ease-out), opacity 200ms ease; }
.stop-card:active { transform: scale(.975); }
.stop.is-closed .stop-card { opacity: .62; }
.stop-ico { width: 64px; height: 64px; flex-shrink: 0; border-radius: 20px; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 40%, rgba(255,182,227,.28), rgba(43,6,33,.2) 70%); }
.stop-ico img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
.stop.is-done .stop-ico { background: radial-gradient(circle at 50% 40%, rgba(79,211,196,.35), rgba(43,6,33,.2) 70%); }
.stop-main { flex: 1; min-width: 0; }
.stop-main h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.05; overflow-wrap: anywhere; }
.stop-time { font-size: 13px; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.stop-time svg { width: 13px; height: 13px; opacity: .8; }
.stop-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chev { width: 18px; height: 18px; opacity: .5; flex-shrink: 0; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; line-height: 1.15; background: rgba(255,255,255,.1); color: var(--dim); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.open { background: rgba(255,182,227,.16); color: var(--pink); }
.pill.open .dot { animation: blink 1.4s ease-in-out infinite; }
.pill.soon { background: rgba(254,130,89,.16); color: #ffb08f; }
.pill.done { background: rgba(79,211,196,.18); color: var(--teal); }
.pill.reward { background: linear-gradient(135deg, var(--crimson), var(--crimson-deep)); color: #fff; box-shadow: 0 4px 12px rgba(212,42,92,.35); }
.pill.hard { background: rgba(212,42,92,.22); color: #ff9dbd; }
.pill.easy { background: rgba(79,211,196,.16); color: var(--teal); }
@keyframes blink { 50% { opacity: .3; } }

.reveal > * { animation: rise 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ============ map ============ */
.floors { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 12px; padding: 4px 16px; scrollbar-width: none; }
.floors::-webkit-scrollbar { display: none; }
.floor-chip { flex-shrink: 0; border: 1px solid var(--stroke); background: rgba(255,255,255,.06); padding: 8px 14px; border-radius: 999px; font-family: 'BernTYGRA'; font-size: 12px; text-transform: uppercase; color: var(--dim); transition: background 180ms ease, color 180ms ease, border-color 180ms ease; }
.floor-chip.on { background: #fff; color: var(--ink); border-color: #fff; }
.mapbox { position: relative; height: calc(100dvh - var(--st) - var(--sb) - var(--tabbar-h) - 250px); min-height: 320px; border-radius: var(--r-xl); overflow: hidden; touch-action: none;
  background: radial-gradient(circle at 50% 40%, rgba(107,14,78,.55), rgba(18,6,16,.9)); border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--hi), 0 14px 40px rgba(0,0,0,.4); }
.pz { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.pz img.mapimg { display: block; width: 100%; height: 100%; pointer-events: none; border-radius: 6px; }
.pin { position: absolute; width: 0; height: 0; border: none; background: none; padding: 0; }
.pin-b { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%) scale(var(--inv, 1)); transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; transition: filter 200ms ease; }
.pin-head { width: 46px; height: 46px; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); display: grid; place-items: center;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep)); border: 2px solid #fff; box-shadow: 0 8px 18px rgba(0,0,0,.5); }
.pin-head img { width: 32px; height: 32px; object-fit: contain; transform: rotate(45deg); }
.pin.is-done .pin-head { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); }
.pin.is-closed .pin-head, .pin.is-soon .pin-head { background: linear-gradient(135deg, #5a4252, #2f1f2a); }
.pin-n { position: absolute; top: -8px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--ink); font-family: 'BernTYGRA'; font-size: 11px; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.pin.is-open .pin-b::before { content: ''; position: absolute; left: 50%; bottom: -6px; width: 18px; height: 8px; margin-left: -9px; border-radius: 50%; background: rgba(255,182,227,.6); animation: pinpulse 1.8s var(--ease-out) infinite; }
@keyframes pinpulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.map-hint { text-align: center; color: var(--faint); font-size: 12px; margin-top: 10px; }
.map-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.map-zoom button { width: 40px; height: 40px; border-radius: 50%; border: none; display: grid; place-items: center; color: #fff; }
.map-zoom svg { width: 18px; height: 18px; }

/* ============ empty ============ */
.empty { text-align: center; padding: 50px 20px; color: var(--dim); }
.empty img { width: 120px; height: 120px; object-fit: contain; animation: float 3.2s ease-in-out infinite; filter: drop-shadow(0 16px 26px rgba(0,0,0,.5)); }
.empty h3 { color: #fff; margin: 14px 0 6px; font-size: 20px; }
.empty p { margin: 0 auto; max-width: 28ch; font-size: 14px; line-height: 1.4; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* ============ quests ============ */
.qlist { display: grid; gap: 12px; }
.ticket { position: relative; width: 100%; text-align: left; border: none; padding: 16px 16px 16px 18px; min-height: 108px; display: flex; gap: 14px; align-items: center; color: #fff;
  border-radius: 22px; transition: transform 160ms var(--ease-out);
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.ticket:active { transform: scale(.975); }
.ticket.easy { background: linear-gradient(135deg, rgba(79,211,196,.34), rgba(35,139,128,.18) 50%, rgba(43,6,33,.55)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.ticket.hard { background: linear-gradient(135deg, rgba(212,42,92,.55), rgba(140,18,64,.3) 50%, rgba(43,6,33,.6)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.ticket::after { content: ''; position: absolute; right: 86px; top: 14px; bottom: 14px; border-left: 2px dashed rgba(255,255,255,.28); }
.ticket .t-ico { width: 58px; height: 58px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.ticket .t-main { flex: 1; min-width: 0; padding-right: 84px; }
.ticket h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.08; overflow-wrap: anywhere; }
.ticket p { margin: 0; font-size: 12.5px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.ticket .t-rew { position: absolute; right: 0; top: 0; bottom: 0; width: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ticket .t-rew b { font-family: 'BernTYGRA'; font-size: 26px; line-height: 1; }
.ticket .t-rew small { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.ticket.done { opacity: .78; }
.ticket.done .t-rew b { color: var(--teal); }
.stamp { position: absolute; right: 94px; top: 50%; transform: translateY(-50%) rotate(-12deg); border: 2px solid var(--teal); color: var(--teal); border-radius: 10px; padding: 3px 8px; font-family: 'BernTYGRA'; font-size: 12px; text-transform: uppercase; background: rgba(6,37,33,.4); }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 12px; }
.sec-title h2 { margin: 0; font-size: 20px; }
.sec-title span { color: var(--faint); font-size: 12.5px; }

/* ============ rating ============ */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 10px 0 18px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; animation: podrise 700ms var(--ease-out) both; }
.pod:nth-child(1) { animation-delay: 120ms; } .pod:nth-child(2) { animation-delay: 0ms; } .pod:nth-child(3) { animation-delay: 220ms; }
@keyframes podrise { from { opacity: 0; transform: translateY(30px); } }
.pod .ava-wrap { position: relative; margin-bottom: 8px; }
.pod .ava { width: 64px; height: 64px; border: 3px solid rgba(255,255,255,.7); }
.pod.first .ava { width: 84px; height: 84px; border-color: var(--pink); box-shadow: 0 0 30px rgba(255,182,227,.55); }
.pod .hat { position: absolute; left: 50%; top: -34px; width: 50px; transform: translateX(-50%) rotate(-10deg); filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); animation: hat 3s ease-in-out infinite; }
@keyframes hat { 0%, 100% { transform: translateX(-50%) rotate(-10deg) translateY(0); } 50% { transform: translateX(-50%) rotate(-4deg) translateY(-4px); } }
.pod .nm { font-size: 13px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .un { font-size: 11px; color: var(--faint); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .block { width: 100%; margin-top: 8px; border-radius: 18px 18px 8px 8px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 10px; }
.pod .block b { font-family: 'BernTYGRA'; font-size: 22px; line-height: 1; }
.pod .block small { font-size: 10px; color: var(--dim); }
.pod .place { font-family: 'BernTYGRA'; font-size: 30px; opacity: .35; margin-top: 4px; }
.pod.first .block { height: 132px; background: linear-gradient(180deg, rgba(212,42,92,.7), rgba(140,18,64,.35)); }
.pod.second .block { height: 100px; background: linear-gradient(180deg, rgba(79,211,196,.45), rgba(35,139,128,.2)); }
.pod.third .block { height: 80px; background: linear-gradient(180deg, rgba(254,130,89,.45), rgba(180,70,40,.2)); }
.lb { display: grid; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 20px; }
.lb-row .rk { width: 30px; text-align: center; font-family: 'BernTYGRA'; font-size: 15px; color: var(--dim); flex-shrink: 0; }
.lb-row .ava { width: 42px; height: 42px; }
.lb-row .who { flex: 1; min-width: 0; }
.lb-row .who b { display: block; font-weight: normal; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .who small { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.lb-row .sc { font-family: 'BernTYGRA'; font-size: 18px; flex-shrink: 0; }
.lb-row.me { border-color: rgba(255,182,227,.6); background: linear-gradient(135deg, rgba(212,42,92,.4), rgba(50,10,38,.6)); }
.mypos { position: sticky; top: calc(var(--st) + 4px); z-index: 3; margin-bottom: 12px; }

/* ============ avatar ============ */
.ava { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--c1, #d42a5c), var(--c2, #6b0e4e)); }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava .ini { font-family: 'BernTYGRA'; font-size: calc(var(--s, 42px) * .42); color: #fff; line-height: 1; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.ava svg.ini { width: 46%; height: 46%; }

/* ============ profile ============ */
.prof { text-align: center; padding-top: 10px; }
.prof-ava { position: relative; width: 132px; height: 132px; margin: 0 auto 16px; }
.prof-ava .ava { width: 132px; height: 132px; border: 4px solid rgba(18,6,16,.9); position: relative; z-index: 1; }
.prof-ava::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from 0deg, var(--teal), var(--pink), var(--crimson), var(--orange), var(--teal)); animation: spin 6s linear infinite; }
.prof-ava::after { content: ''; position: absolute; inset: -20px; border-radius: 50%; background: radial-gradient(circle, rgba(255,182,227,.35), transparent 70%); z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.prof h2 { margin: 0; font-size: 26px; overflow-wrap: anywhere; line-height: 1.05; }
.prof .un { color: var(--faint); margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.bigscore { position: relative; margin: 22px auto 0; padding: 22px 16px 18px; border-radius: var(--r-xl); overflow: hidden; }
.bigscore::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('assets/img/card-bg.jpg') center/cover; opacity: .45; animation: swirl 40s linear infinite; transform-origin: 50% 50%; scale: 1.8; }
@keyframes swirl { to { rotate: 360deg; } }
.bigscore .num { font-size: 76px; line-height: .9; background: linear-gradient(180deg, #fff 20%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 26px rgba(255,182,227,.55)); }
.bigscore .lbl { color: var(--dim); font-size: 13px; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.stat { border-radius: 20px; padding: 12px 8px; }
.stat b { display: block; font-family: 'BernTYGRA'; font-size: 22px; }
.stat small { color: var(--dim); font-size: 11.5px; }
.photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos-grid button { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; border: none; padding: 0; background: rgba(255,255,255,.06); }
.photos-grid img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 300ms ease; }
.photos-grid img.ok { opacity: 1; }
.photos-grid span { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 10px; text-align: left; text-shadow: 0 1px 4px rgba(0,0,0,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-entry { margin-top: 22px; width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; text-align: left; }
.admin-entry img { width: 44px; height: 44px; object-fit: contain; }
.admin-entry b { display: block; font-family: 'BernTYGRA'; text-transform: uppercase; font-size: 16px; font-weight: normal; }
.admin-entry small { color: var(--dim); font-size: 12px; }

/* ============ buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: none; border-radius: 999px; padding: 17px 22px; font-size: 15px; color: #fff; width: 100%;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep)); box-shadow: 0 12px 28px rgba(212,42,92,.42), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform 140ms var(--ease-out), opacity 200ms ease, filter 200ms ease; }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }
.btn.teal { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: #06221f; box-shadow: 0 12px 30px rgba(79,211,196,.4), inset 0 1px 0 rgba(255,255,255,.4); }
.btn.ghost { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--stroke); }
.btn.danger { background: rgba(255,70,100,.14); color: #ff9aac; box-shadow: inset 0 0 0 1px rgba(255,90,120,.4); }
.btn.sm { padding: 11px 16px; font-size: 12.5px; width: auto; }
.btn[disabled] { opacity: .45; filter: grayscale(.4); pointer-events: none; }
.btn.glow { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 12px 40px rgba(79,211,196,.75), 0 0 0 6px rgba(79,211,196,.15), inset 0 1px 0 rgba(255,255,255,.4); } }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: none; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.icon-btn svg { width: 20px; height: 20px; }

/* ============ tab bar + QR fab ============ */
.tabbar { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + var(--sb)); height: var(--tabbar-h); border-radius: 999px; display: flex; align-items: center; padding: 6px; }
.tab { position: relative; z-index: 1; flex: 1; height: 100%; border: none; background: none; color: var(--dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; transition: color 200ms ease; }
.tab img { width: 28px; height: 28px; object-fit: contain; opacity: .65; transition: opacity 200ms ease, transform 320ms var(--ease-out), filter 200ms ease; }
.tab span { font-size: 9.5px; }
.tab.active { color: #fff; }
.tab.active img { opacity: 1; transform: translateY(-1px) scale(1.12); filter: drop-shadow(0 2px 10px rgba(255,182,227,.55)); }
.tab:active img { transform: scale(.9); }
.tab-gap { flex: 0 0 76px; }
.tab-ind { position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; background: var(--glass-strong); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 14px rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12);
  transition: transform 460ms var(--ease-drawer), width 460ms var(--ease-drawer); }
.qr-fab { position: fixed; z-index: 31; left: 50%; bottom: calc(10px + var(--sb) + var(--tabbar-h) / 2); width: 78px; height: 78px; margin-left: -39px; margin-bottom: -26px; border: none; border-radius: 50%; padding: 0; background: none; transition: transform 160ms var(--ease-out); }
.qr-fab:active { transform: scale(.92); }
.qr-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--teal), var(--pink), var(--crimson), var(--orange), var(--teal)); animation: spin 5s linear infinite; box-shadow: 0 10px 30px rgba(212,42,92,.55), 0 0 40px rgba(255,182,227,.35); }
.qr-core { position: absolute; inset: 5px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 25%, #ff5a8a, var(--crimson) 45%, #6a0e33); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -6px 14px rgba(0,0,0,.3); color: #fff; }
.qr-core svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
body.overlay-open .tabbar, body.overlay-open .qr-fab { transform: translateY(140%); }
.tabbar, .qr-fab { transition: transform 360ms var(--ease-drawer); }

/* ============ sheets ============ */
#layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(8,2,6,.6); opacity: 0; transition: opacity 320ms ease; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--st) - 28px); display: flex; flex-direction: column; pointer-events: auto;
  border-radius: 34px 34px 0 0; overflow: hidden; transform: translateY(100%); transition: transform 460ms var(--ease-drawer);
  background: linear-gradient(180deg, rgba(58,12,44,.96), rgba(22,6,18,.98)); border-top: 1px solid var(--stroke-2); box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
.sheet.full { height: calc(100% - var(--st) - 28px); }
.layer-item.open .scrim { opacity: 1; }
.layer-item.open .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.grab { position: absolute; top: 8px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: rgba(255,255,255,.35); z-index: 5; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1; padding-bottom: calc(24px + var(--sb)); }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 6; }
.sheet-pad { padding: 0 20px; }

.hero { position: relative; height: 290px; display: grid; place-items: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40%; background: url('assets/img/card-bg.jpg') center/cover; opacity: .7; animation: swirl 60s linear infinite; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,6,18,.1), rgba(22,6,18,0) 40%, rgba(40,10,30,.96)); }
.hero .glow { position: absolute; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(255,182,227,.5), rgba(79,211,196,.12) 55%, transparent 72%); filter: blur(20px); animation: breathe 3.4s ease-in-out infinite; }
.hero img.art { position: relative; z-index: 1; width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0,0,0,.55)); animation: float 3.6s ease-in-out infinite; }
.hero .hero-photo { position: relative; z-index: 1; width: 170px; height: 220px; object-fit: cover; border-radius: 20px; border: 6px solid var(--cream); transform: rotate(-4deg); box-shadow: 0 20px 40px rgba(0,0,0,.55); }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .8; } }
.card-title { margin: -18px 0 10px; font-size: clamp(30px, 9.5vw, 40px); line-height: .95; position: relative; z-index: 2; text-shadow: 0 4px 24px rgba(212,42,92,.6); overflow-wrap: anywhere; }
.card-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.card-desc { color: var(--dim); font-size: 15px; line-height: 1.5; margin: 0 0 18px; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.tile { border-radius: 20px; padding: 12px 14px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); }
.tile small { display: block; color: var(--faint); font-size: 11.5px; margin-bottom: 4px; }
.tile b { font-family: 'BernTYGRA'; font-size: 24px; font-weight: normal; }
.tile.rew { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(212,42,92,.45), rgba(107,14,78,.35)); }
.tile.rew b { font-size: 36px; color: var(--pink); text-shadow: 0 2px 18px rgba(255,182,227,.5); }
.tile.rew img { width: 54px; height: 54px; object-fit: contain; }
.verified { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(79,211,196,.14); border: 1px solid rgba(79,211,196,.45); margin-bottom: 14px; animation: rise 420ms var(--ease-out); }
.verified svg { width: 26px; height: 26px; color: var(--teal); flex-shrink: 0; }
.verified b { display: block; font-family: 'BernTYGRA'; text-transform: uppercase; font-weight: normal; color: var(--teal); }
.verified small { color: var(--dim); font-size: 12.5px; }
.done-box { text-align: center; padding: 6px 0 4px; }
.done-box img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 22px; margin-top: 10px; }
.cta-note { text-align: center; color: var(--faint); font-size: 12px; margin-top: 10px; }

/* ============ toast ============ */
#toasts { position: fixed; z-index: 120; top: calc(var(--st) + 10px); left: 12px; right: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 100%; padding: 12px 18px; border-radius: 999px; font-size: 14px; display: flex; align-items: center; gap: 10px; transform: translateY(-18px) scale(.96); opacity: 0; transition: transform 320ms var(--ease-out), opacity 240ms ease; }
.toast.show { transform: none; opacity: 1; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.ok svg { color: var(--teal); } .toast.err svg { color: #ff8da5; }

/* ============ fx canvas ============ */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 110; pointer-events: none; }
.reward-pop { position: fixed; z-index: 111; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.reward-pop b { display: block; font-family: 'BernTYGRA'; font-size: 92px; line-height: 1; color: #fff; text-shadow: 0 0 40px rgba(255,182,227,.9), 0 6px 0 var(--crimson); animation: popin 900ms var(--ease-out) both; }
.reward-pop span { display: block; font-family: 'BernTYGRA'; text-transform: uppercase; font-size: 20px; color: var(--teal); margin-top: 6px; animation: popin 900ms 120ms var(--ease-out) both; }
.reward-pop.out { transition: opacity 400ms ease, transform 500ms var(--ease-out); opacity: 0; transform: translate(-50%, -80%) scale(.9); }
@keyframes popin { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.12) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }

/* ============ camera screens ============ */
.cam { position: fixed; inset: 0; z-index: 90; background: #000; pointer-events: auto; opacity: 0; transition: opacity 260ms ease; overflow: hidden; }
.cam.open { opacity: 1; }
.cam video, .cam canvas.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam.selfie video, .cam.selfie canvas.shot { transform: scaleX(-1); }
.cam-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: calc(var(--st) + 12px) 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.cam-title { font-family: 'BernTYGRA'; text-transform: uppercase; font-size: 18px; text-align: center; flex: 1; text-shadow: 0 2px 10px rgba(0,0,0,.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 26px 20px calc(var(--sb) + 26px); background: linear-gradient(0deg, rgba(0,0,0,.65), transparent); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cam-hint { text-align: center; font-size: 15px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.7); min-height: 22px; transition: opacity 200ms ease; max-width: 30ch; }
.shade { position: absolute; z-index: 1; pointer-events: none; border-radius: 34px; box-shadow: 0 0 0 200vmax rgba(10,2,8,.55); transition: all 280ms var(--ease-out); }
.finder { position: absolute; z-index: 2; pointer-events: none; transition: transform 300ms var(--ease-out); }
.finder i { position: absolute; width: 46px; height: 46px; border: 5px solid #fff; filter: drop-shadow(0 0 8px rgba(255,182,227,.8)); transition: all 260ms var(--ease-out), border-color 200ms ease; }
.finder i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 26px; }
.finder i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 26px; }
.finder i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 26px; }
.finder i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 26px; }
.finder.idle { animation: breathe2 2.2s ease-in-out infinite; }
@keyframes breathe2 { 50% { transform: scale(1.035); } }
.finder .laser { position: absolute; left: 8%; right: 8%; height: 3px; top: 50%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--pink), #fff, var(--pink), transparent); box-shadow: 0 0 18px var(--pink); animation: laser 2s var(--ease-io) infinite alternate; }
@keyframes laser { from { transform: translateY(-110px); } to { transform: translateY(110px); } }
.finder.lock i { border-color: var(--teal); filter: drop-shadow(0 0 14px var(--teal)); }
.finder.lock .laser, .finder.bad .laser { opacity: 0; }
.finder.bad { animation: shake 420ms ease; }
.finder.bad i { border-color: #ff7b96; }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
.cam-flash { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camflash 500ms ease-out; }
@keyframes camflash { 0% { opacity: .85; } 100% { opacity: 0; } }
.shutter { width: 84px; height: 84px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.18); padding: 0; position: relative; transition: transform 140ms var(--ease-out); }
.shutter::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: linear-gradient(135deg, #fff, var(--pink)); transition: transform 140ms var(--ease-out); }
.shutter:active::after { transform: scale(.86); }
.cam-row { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 340px; }
.cam-row .icon-btn, .cam-top .icon-btn { background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.2); }
.cam-row .icon-btn.on { background: #fff; color: #000; }
.selfie-frame { position: absolute; z-index: 1; left: 8%; right: 8%; top: 17%; bottom: 25%; border-radius: 40% 40% 36% 36% / 32% 32% 28% 28%; box-shadow: 0 0 0 200vmax rgba(10,2,8,.4); border: 2px dashed rgba(255,244,222,.55); pointer-events: none; transition: opacity 250ms ease; }
.cam.previewing .selfie-frame { opacity: 0; }
.cam-actions { display: flex; gap: 10px; width: 100%; max-width: 380px; }
.cam-actions .btn { flex: 1; }
.upload-ring { width: 64px; height: 64px; }
.cam-center { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 30px; }
.cam-center img { width: 120px; margin-bottom: 14px; }
.cam-center h3 { font-size: 22px; margin: 0 0 8px; }
.cam-center p { color: var(--dim); margin: 0 0 18px; font-size: 14px; line-height: 1.45; }
.file-label { position: relative; overflow: hidden; }
.file-label input { position: absolute; inset: 0; opacity: 0; }

/* ============ lightbox ============ */
.lightbox { position: absolute; inset: 0; pointer-events: auto; background: rgba(8,2,6,.92); display: grid; place-items: center; opacity: 0; transition: opacity 240ms ease; padding: calc(var(--st) + 50px) 16px calc(var(--sb) + 30px); }
.layer-item.open .lightbox { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 22px; transform: scale(.94); transition: transform 360ms var(--ease-out); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.layer-item.open .lightbox img { transform: none; }

/* ============ splash / curtains ============ */
.splash { position: fixed; inset: 0; z-index: 200; pointer-events: auto; overflow: hidden; }
.curtain { position: absolute; top: 0; bottom: 0; width: 52%; transition: transform 1100ms var(--ease-io);
  background: repeating-linear-gradient(90deg, #7a0d33 0 16px, #a3123f 16px 30px, #6a0b2c 30px 44px), #8c1240; box-shadow: inset 0 -80px 120px rgba(0,0,0,.5); }
.curtain::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.06) 40%, rgba(0,0,0,.4)); }
.curtain.left { left: 0; transform-origin: 0 0; border-right: 3px solid #e7b95c; }
.curtain.right { right: 0; transform-origin: 100% 0; border-left: 3px solid #e7b95c; }
.valance { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--st) + 36px); background: radial-gradient(circle at 20px 0, #b8163f 18px, transparent 19px) 0 calc(var(--st) + 10px) / 40px 40px repeat-x, linear-gradient(#5a0823, #8c1240); border-bottom: 2px solid #e7b95c; transition: transform 900ms var(--ease-io) 200ms; z-index: 2; }
.splash-core { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; z-index: 3; transition: opacity 400ms ease, transform 600ms var(--ease-out); }
.splash-ring { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.splash-ring::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--teal); border-right-color: var(--pink); animation: spin 1s linear infinite; }
.splash-ring img { width: 104px; height: 104px; object-fit: contain; animation: float 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.splash-msg { font-family: 'BernTYGRA'; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--cream); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.splash.open .curtain.left { transform: translateX(-100%) skewX(-4deg); }
.splash.open .curtain.right { transform: translateX(100%) skewX(4deg); }
.splash.open .valance { transform: translateY(-110%); }
.splash.open .splash-core { opacity: 0; transform: scale(1.2); }
.splash.gone { display: none; }

/* ============ forms (admin) ============ */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; color: var(--dim); margin: 0 0 6px 6px; }
.input { width: 100%; border: 1px solid var(--stroke); background: rgba(0,0,0,.25); color: #fff; border-radius: 16px; padding: 14px 16px; font: 16px 'Biolilbert', sans-serif; outline: none; transition: border-color 160ms ease, background 160ms ease; }
.input:focus { border-color: var(--pink); background: rgba(0,0,0,.35); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.4; }
.input[type=datetime-local] { min-height: 52px; color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); margin-bottom: 12px; }
.switch b { font-weight: normal; font-size: 15px; } .switch small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.switch input { display: none; }
.switch .sw { position: relative; width: 52px; height: 32px; border-radius: 999px; background: rgba(255,255,255,.18); flex-shrink: 0; transition: background 200ms ease; }
.switch .sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform 260ms var(--ease-out); }
.switch input:checked + .sw { background: var(--teal); }
.switch input:checked + .sw::after { transform: translateX(20px); }
.icons-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.icons-pick button { aspect-ratio: 1; border-radius: 16px; border: 2px solid transparent; background: rgba(255,255,255,.06); padding: 6px; display: grid; place-items: center; transition: border-color 160ms ease, background 160ms ease; }
.icons-pick button img { width: 100%; height: 100%; object-fit: contain; }
.icons-pick button.on { border-color: var(--pink); background: rgba(255,182,227,.14); }
.icons-pick .up { color: var(--dim); }
.icons-pick .up svg { width: 24px; height: 24px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 140px; }
.hr { height: 1px; background: var(--stroke); margin: 18px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ============ admin ============ */
.adm-item { position: absolute; inset: 0; pointer-events: auto; }
.adm { position: absolute; inset: 0; display: flex; flex-direction: column; transform: translateY(24px) scale(.985); opacity: 0;
  transition: transform 460ms var(--ease-drawer), opacity 280ms ease;
  background: radial-gradient(120% 50% at 50% -10%, rgba(212,42,92,.35), transparent 60%), linear-gradient(170deg, #3a0a2c, #170512 60%, #0e030b); }
.adm-item.open .adm { transform: none; opacity: 1; }
.adm-top { display: flex; align-items: center; gap: 12px; padding: calc(var(--st) + 12px) 16px 6px; }
.adm-title { flex: 1; min-width: 0; }
.adm-title h2 { margin: 0; font-size: 28px; line-height: 1; }
.adm-title small { color: var(--faint); font-size: 12px; }
.adm-wand { width: 46px; height: 46px; object-fit: contain; animation: float 3s ease-in-out infinite; }
.adm-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 12px; scrollbar-width: none; flex-shrink: 0; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { flex-shrink: 0; border: 1px solid var(--stroke); background: rgba(255,255,255,.05); color: var(--dim); border-radius: 999px; padding: 9px 15px;
  font-family: 'BernTYGRA'; text-transform: uppercase; font-size: 12px; transition: all 200ms var(--ease-out); }
.adm-tabs button.on { background: linear-gradient(135deg, var(--crimson), var(--crimson-deep)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(212,42,92,.45); }
.adm-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 16px calc(var(--sb) + 40px); }
.adm-body > * { animation: rise 420ms var(--ease-out) both; }
.adm-loading { display: grid; place-items: center; padding: 60px 0; }
.adm-loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--pink); animation: spin 800ms linear infinite; }
.muted { color: var(--faint); font-size: 12.5px; line-height: 1.4; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.kpi { border-radius: 20px; padding: 14px; }
.kpi b { display: block; font-family: 'BernTYGRA'; font-size: 30px; line-height: 1; font-weight: normal; }
.kpi small { color: var(--dim); font-size: 12px; }
.kpi-big { font-family: 'BernTYGRA'; font-size: 44px; color: var(--pink); }
.adm-card { border-radius: 24px; padding: 16px; margin-bottom: 12px; }
.adm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.adm-h h3 { margin: 0; font-size: 16px; }
.adm-h small { color: var(--faint); font-size: 11.5px; text-align: right; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.spark i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--pink), var(--crimson)); animation: grow 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 18ms); transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } }
.spark-lbl { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; }
.hb { display: grid; grid-template-columns: minmax(0, 1fr) 90px 30px; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t { height: 8px; background: rgba(255,255,255,.08); border-radius: 9px; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--pink)); animation: growx 800ms var(--ease-out) both; transform-origin: left; }
@keyframes growx { from { transform: scaleX(0); } }
.hb b { font-family: 'BernTYGRA'; text-align: right; font-weight: normal; }
.adm-list { display: grid; gap: 8px; margin-top: 12px; }
.adm-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 20px; width: 100%; text-align: left; color: #fff; border: 1px solid var(--stroke); }
button.adm-row { background: var(--glass); }
.adm-ico { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.adm-main { flex: 1; min-width: 0; border: none; background: none; text-align: left; padding: 0; color: #fff; }
.adm-main b { display: block; font-weight: normal; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-main small { display: block; color: var(--faint); font-size: 12px; margin-top: 3px; line-height: 1.5; }
.adm-main .pill { padding: 2px 7px; font-size: 9.5px; vertical-align: 1px; }
.adm-ord { display: flex; flex-direction: column; gap: 4px; }
.adm-ord button { width: 34px; height: 28px; border-radius: 10px; border: 1px solid var(--stroke); background: rgba(255,255,255,.06); display: grid; place-items: center; }
.adm-ord button svg { width: 16px; height: 16px; }
.adm-ord button[disabled] { opacity: .25; }
.adm-row .rk { width: 28px; text-align: center; font-family: 'BernTYGRA'; color: var(--dim); flex-shrink: 0; }
.adm-row .sc { font-family: 'BernTYGRA'; font-size: 17px; flex-shrink: 0; padding-right: 4px; }
.adm-row .ava { width: 40px; height: 40px; }
.form-pad { padding-top: 34px; }
.form-h { margin: 0 0 18px; font-size: 28px; line-height: 1; overflow-wrap: anywhere; padding-right: 50px; }
.form-sub { margin: 4px 0 12px; font-size: 16px; }
.qr-box { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 22px; padding: 10px; margin-bottom: 12px; }
.qr-box img { width: 120px; height: 120px; border-radius: 10px; flex-shrink: 0; }
.qr-meta small { display: block; color: #6b0e4e; font-size: 11px; margin-bottom: 4px; }
.qr-meta code { color: #1a0716; font-size: 11.5px; word-break: break-all; -webkit-user-select: all; user-select: all; }
.adm-floors { margin: 0 -16px 12px; }
.floor-chip.add { color: var(--pink); border-style: dashed; }
.adm-map { height: 58vh; min-height: 300px; }
.adm-pin { cursor: grab; touch-action: none; }
.adm-pin.dragging .pin-b { filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)) brightness(1.15); transform: translate(-50%, -100%) scale(calc(var(--inv, 1) * 1.2)); }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.tray-item { border: 1px solid var(--stroke); background: rgba(255,255,255,.05); border-radius: 18px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: #fff; }
.tray-item img { width: 40px; height: 40px; object-fit: contain; }
.tray-item span { font-size: 12px; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tray-item small { font-size: 10px; color: var(--faint); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-photos button.vj-off img { opacity: .4 !important; filter: grayscale(1); }
.adm-photos em { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 9.5px; background: rgba(0,0,0,.6); padding: 2px 6px; border-radius: 6px; }
.viewer-img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 22px; background: rgba(0,0,0,.3); }
#userSearch { margin-bottom: 4px; }
.u-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-right: 50px; }
.u-head .ava { width: 72px; height: 72px; }
.bonus-row { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 6px; align-items: center; }
.bonus-row .btn { padding: 11px 10px; }
.bonus-row .input { text-align: center; padding: 11px 6px; }
.link-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.link-row code { flex: 1; min-width: 0; font-size: 11px; color: var(--dim); background: rgba(0,0,0,.3); border-radius: 12px; padding: 10px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-row .icon-btn { width: 40px; height: 40px; }
.link-row .icon-btn svg { width: 18px; height: 18px; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row .input { flex: 1; }
.bc .bar { margin-bottom: 8px; }
.vj-card { background: linear-gradient(135deg, rgba(79,211,196,.18), rgba(50,10,38,.55)); }
.btn-row .file-label { cursor: pointer; }
.cam-sub { margin-top: -8px; }
