@font-face{font-family:'Fredoka One';font-style:normal;font-weight:400;font-display:swap;src:url(/fredoka-one-400.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400 700;font-display:swap;src:url(/nunito-var.woff2) format('woff2');}
*, *::before, *::after { box-sizing: border-box; }
:root {
  --purple: #7C3AED;
  --pink:   #EC4899;
  --blue:   #22D3EE;
  --lime:   #A3E635;

  color-scheme: dark;
  --bg:
    radial-gradient(900px 500px at 15% 8%, rgba(124,58,237,.22), transparent 60%),
    radial-gradient(900px 600px at 85% 92%, rgba(236,72,153,.18), transparent 60%),
    radial-gradient(700px 500px at 70% 18%, rgba(34,211,238,.10), transparent 60%),
    #15101f;
  --bg-solid: #15101f;
  --panel: #221a32;
  --panel-2: #2a2040;
  --ink: #F5F3FF;
  --muted: #b3a8cf;
  --border: #3a2c58;
  --thumb-bg: #241c38;
  --subcard: linear-gradient(135deg, #2c2142, #3a2440);
  --title: #C4B5FD;
}
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-solid);
  color: var(--ink);
  margin: 0;
}
a { color: #7C3AED; text-decoration: none; }
a:hover { color: #EC4899; }

.hidden { display: none; }

.thumb.d0{animation-delay:0s}.thumb.d1{animation-delay:.05s}.thumb.d2{animation-delay:.1s}.thumb.d3{animation-delay:.15s}.thumb.d4{animation-delay:.2s}.thumb.d5{animation-delay:.25s}.thumb.d6{animation-delay:.3s}.thumb.d7{animation-delay:.35s}.thumb.d8{animation-delay:.4s}.thumb.d9{animation-delay:.45s}.thumb.d10{animation-delay:.5s}.thumb.d11{animation-delay:.55s}.thumb.d12{animation-delay:.6s}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes logoFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes dripGrow  { 0% { height: 0; } 60%, 100% { height: var(--h); } }
@keyframes dripBead  { 0%,55% { transform: translate(-50%,0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(-50%,34px); opacity: 0; } }
@keyframes btnShimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.drips { position: absolute; top: 0; left: 0; right: 0; height: 0; z-index: 3; pointer-events: none; }
.drip {
  position: absolute; top: -2px; width: 10px; left: var(--l); height: var(--h);
  background: var(--c); border-radius: 0 0 8px 8px; transform-origin: top;
  animation: dripGrow 2.6s ease-out var(--d) both;
}
.drip::after {
  content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--c);
  animation: dripBead 2.8s ease-in var(--d) infinite;
}
.drip:nth-child(1) { --l:18%; --h:46px; --c:var(--blue);   --d:.2s; }
.drip:nth-child(2) { --l:42%; --h:30px; --c:var(--pink);   --d:.5s; }
.drip:nth-child(3) { --l:63%; --h:54px; --c:var(--purple); --d:.1s; }
.drip:nth-child(4) { --l:82%; --h:34px; --c:var(--blue);   --d:.7s; }

.graffiti-btn {
  position: relative; border: none; cursor: pointer; color: #fff;
  font-family: 'Fredoka One', cursive; text-decoration: none;
  background: linear-gradient(135deg, var(--purple), var(--pink), var(--purple));
  background-size: 220% 220%;
  box-shadow: 0 6px 18px rgba(124,58,237,0.28);
  transition: transform .12s ease, box-shadow .25s ease;
  animation: btnShimmer 6s ease-in-out infinite;
}
.graffiti-btn > span { position: relative; z-index: 2; }
.graffiti-btn::before {
  content: ''; position: absolute; inset: -7px; border-radius: inherit;
  background:
    radial-gradient(circle at 10% 18%, var(--blue) 0 6px, transparent 7px),
    radial-gradient(circle at 90% 28%, var(--lime) 0 5px, transparent 6px),
    radial-gradient(circle at 72% 88%, var(--blue) 0 4px, transparent 5px),
    radial-gradient(circle at 22% 82%, var(--pink) 0 5px, transparent 6px);
  opacity: 0; transform: scale(.7);
  transition: opacity .3s ease, transform .3s ease; pointer-events: none;
}
.graffiti-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(236,72,153,0.42); }
.graffiti-btn:hover::before { opacity: .9; transform: scale(1.15); }
.graffiti-btn:active { transform: scale(.97); }
.graffiti-btn:active::before { opacity: 1; transform: scale(1.18); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
body.home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}

.mist { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mist i {
  position: absolute; bottom: -20px; width: var(--sz); height: var(--sz); border-radius: 50%;
  left: var(--l); background: var(--c); opacity: 0;
  box-shadow: 0 0 14px var(--c);
  animation: mistRise var(--t) ease-in var(--d) infinite;
}
@keyframes mistRise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  12%  { opacity: var(--o); }
  80%  { opacity: var(--o); }
  100% { transform: translateY(-115vh) scale(.55); opacity: 0; }
}
.mist i:nth-child(1){--l:5%;--c:rgba(124,58,237,.7);--sz:12px;--o:.8;--t:9s;--d:0s}
.mist i:nth-child(2){--l:23%;--c:rgba(34,211,238,.6);--sz:14px;--o:.75;--t:8s;--d:1s}
.mist i:nth-child(3){--l:41%;--c:rgba(236,72,153,.7);--sz:16px;--o:.8;--t:10s;--d:1.5s}
.mist i:nth-child(4){--l:50%;--c:rgba(163,230,53,.6);--sz:10px;--o:.7;--t:9.5s;--d:.5s}
.mist i:nth-child(5){--l:68%;--c:rgba(124,58,237,.7);--sz:9px;--o:.8;--t:10.5s;--d:4s}
.mist i:nth-child(6){--l:77%;--c:rgba(236,72,153,.65);--sz:15px;--o:.75;--t:8.5s;--d:1.2s}
.mist i:nth-child(7){--l:86%;--c:rgba(34,211,238,.6);--sz:11px;--o:.7;--t:12.5s;--d:3s}
.mist i:nth-child(8){--l:95%;--c:rgba(124,58,237,.65);--sz:13px;--o:.8;--t:9.8s;--d:2.2s}

.box {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--panel);
  padding: clamp(2rem, 4vw, 3.75rem) clamp(1.75rem, 4vw, 3.5rem);
  border-radius: clamp(24px, 3vw, 32px);
  box-shadow: 0 8px 40px rgba(124,58,237,0.12), 0 2px 8px rgba(236,72,153,0.06);
  text-align: center;
  width: min(92vw, 680px);
  animation: fadeInUp 0.5s ease both;
}

.logo-stack { position: relative; z-index: 2; display: inline-block; }
.logo {
  width: clamp(170px, 26vw, 280px); display: block; margin: 0 auto 0.25rem;
  filter: drop-shadow(0 8px 18px rgba(124,58,237,0.25));
  animation: logoPop .7s cubic-bezier(.2,1.5,.4,1) .15s both,
             logoFloat 4s ease-in-out 1s infinite;
}
@keyframes logoPop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.08) rotate(4deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
form { position: relative; z-index: 1; margin-top: 1.75rem; }
input[type="text"] {
  width: 100%;
  padding: clamp(0.75rem, 0.6rem + 0.6vw, 1.1rem) 1rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.3rem);
  font-family: 'Nunito', sans-serif;
  border: 2px solid var(--border);
  color: var(--ink);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  text-align: center;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  background: var(--panel-2);
}
input[type="text"]::placeholder { color: var(--muted); opacity: 1; }
input[type="text"]:focus {
  border-color: #7C3AED;
  animation: sprayRing .55s ease;
  box-shadow: 0 0 0 4px rgba(124,58,237,0.18), 0 0 22px rgba(236,72,153,0.22);
}
@keyframes sprayRing {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
  60%  { box-shadow: 0 0 0 9px rgba(124,58,237,0.08), 0 0 22px rgba(236,72,153,0.22); }
  100% { box-shadow: 0 0 0 4px rgba(124,58,237,0.18), 0 0 22px rgba(236,72,153,0.22); }
}
form button {
  width: 100%;
  padding: clamp(0.8rem, 0.65rem + 0.6vw, 1.15rem);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.4rem);
  letter-spacing: 0.04em;
  border-radius: 12px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 460px);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.35rem, 1.1rem + 1.8vw, 2rem);
  line-height: 1.3;
  text-align: center;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(124,58,237,0.5);
  z-index: 60;
  pointer-events: none;
  animation: toastIn .5s cubic-bezier(.2,1.5,.4,1) both,
             toastOut .6s ease 4.5s forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.8); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translate(-50%, -50%) scale(.92); }
}

.foot-link {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0.85rem + env(safe-area-inset-bottom));
  z-index: 1;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.75;
}
.foot-link:hover { color: var(--ink); opacity: 1; }

body.legal { background: var(--bg); padding: clamp(1rem, 4vw, 3rem) 1rem calc(2rem + env(safe-area-inset-bottom)); }
.legal-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--panel);
  border-radius: clamp(20px, 3vw, 28px);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 8px 40px rgba(124,58,237,0.12), 0 2px 8px rgba(236,72,153,0.06);
  animation: fadeInUp 0.5s ease both;
  line-height: 1.65;
}
.legal-home { display: inline-block; font-weight: 700; margin-bottom: 1rem; }
.legal-card h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 0.25rem;
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.legal-sub { color: var(--muted); margin-top: 0; }
.legal-card h2 {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  color: var(--title);
  font-size: 1.15rem;
  margin: 1.75rem 0 0.4rem;
}
.legal-card p, .legal-card li { margin: 0.4rem 0; }
.legal-card ul { padding-left: 1.25rem; margin: 0.4rem 0; }

.legal-card a { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
.legal-card a:hover { color: var(--ink); }

body { padding: 0; }

header {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.245), rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.105)),
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    rgba(34, 26, 50, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeInDown 0.4s ease both;
  position: sticky;
  top: 0;
  z-index: 10;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/grain.svg");
  opacity: 0.34;
  pointer-events: none;
}
.header-home {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}
.header-logo {
  height: 4rem;
  display: block;
  transition: transform 0.2s ease;
}
.header-home:hover .header-logo { transform: scale(1.06); }
.header-divider {
  position: relative;
  width: 2px;
  height: 2.5rem;
  background: linear-gradient(180deg, #7C3AED, #EC4899);
  border-radius: 2px;
  flex-shrink: 0;
}
.crumbs {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
}

.crumb {
  color: #fff;
  text-decoration: none;
  border: 2px solid transparent;
  background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
              linear-gradient(135deg, var(--purple), var(--pink)) border-box;
  padding: 0.44rem 1.1rem;
  border-radius: 999px;
  font-size: 1.15rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
a.crumb:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(124, 58, 237, 0.35); }
.crumb.current {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--pink)) border-box;
  box-shadow: 0 3px 14px rgba(236, 72, 153, 0.45);
}

.crumb-sep { color: var(--pink); opacity: 0.9; flex-shrink: 0; font-size: 1.2rem; }

.header-share {
  position: relative;
  flex-shrink: 0;
  width: 42px; height: 42px;
  border: none; border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.header-share:hover { transform: scale(1.08); }

.roll-bar { display: none; }
@media (max-width: 600px), (pointer: coarse) and (max-height: 600px) {

  header {
    justify-content: center;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.245), rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.105)),
      linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
      rgba(34, 26, 50, 0.58);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    border-image: none;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0;
  }

  header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/grain.svg");
    opacity: 0.34;
    pointer-events: none;
  }
  .header-divider, .crumbs, .header-share { display: none; }

  .header-home { position: relative; }

  .header-logo { height: 4.1rem; margin-bottom: -1.5rem; }

  body.roll { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  .roll-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    padding: 0.45rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom)) 0;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.245), rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.105)),
      linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
      rgba(34, 26, 50, 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
  }
  .roll-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("/grain.svg");
    opacity: 0.34;
    pointer-events: none;
  }

  .roll-bar::before { content: ""; width: 48px; flex: none; }
  .bar-tree {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;

    max-height: 70vh;

    overflow-y: auto;
    scrollbar-width: none;
  }
  .bar-tree::-webkit-scrollbar { display: none; }

  .tree-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .tree-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #fff;
    border: 2px solid transparent;
    background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
                linear-gradient(135deg, var(--purple), var(--pink)) border-box;
    padding: 0.42rem 1.05rem;
    border-radius: 999px;
  }
  .tree-row.current .tree-pill {

    background: linear-gradient(135deg, var(--purple), var(--pink)) border-box;
    box-shadow: 0 3px 14px rgba(236, 72, 153, 0.45);
  }

  .tree-row .hook { flex: none; }

  .tree-row:not(.current) {
    max-height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(0.6rem) scale(0.85);
    transition: max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, opacity 0.22s ease,
                transform 0.42s cubic-bezier(0.34, 1.66, 0.56, 1);
  }

  .roll-bar.open .tree-row:not(.current) {
    max-height: 3.2rem;
    margin-top: 0.12rem;
    margin-bottom: 0.12rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    opacity: 1;
    transform: none;
  }

  .tree-row.current { cursor: pointer; padding: 0.3rem 0; transition: margin 0.42s cubic-bezier(0.34, 1.66, 0.56, 1); }

  .tree-row.current .hook { width: 0; opacity: 0; transition: width 0.3s ease, opacity 0.25s ease; }
  .roll-bar.open .tree-row.current .hook { width: 18px; opacity: 1; }
  .tree-pill svg { flex: none; transition: transform 0.22s ease; }
  .roll-bar.open .tree-row.current .tree-pill svg { transform: rotate(180deg); }

  .roll-bar.open .ti1 { margin-left: 1.6rem; }
  .roll-bar.open .ti2 { margin-left: 3.2rem; }
  .roll-bar.open .ti3 { margin-left: 4.8rem; }
  .roll-bar.open .ti4 { margin-left: 6.4rem; }
  .roll-bar.open .ti5 { margin-left: 8rem; }
  .roll-bar.open .ti6 { margin-left: 9.6rem; }

  .bar-tool {
    flex: none;
    border: none;
    background: none;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    width: 48px; height: 48px;
    display: grid;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
  }
  .bar-tool svg { width: 26px; height: 26px; }

  .roll-bar.lb-mode { display: none; }
}

.content { padding: 1.25rem; max-width: 1400px; margin: 0 auto; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 0.4rem;
}

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

.thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--thumb-bg);
  aspect-ratio: 1;
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 28px rgba(124,58,237,0.22);
  z-index: 1;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.thumb:hover img { opacity: 0.88; }

.play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.play svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5)); }

.subgrid { margin-bottom: 1.25rem; }
.subcard { background: var(--subcard); }
.subcard .folder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}
.subcard .sublabel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0.625rem 0.625rem;
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: white;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(13,9,23,0.97); }
.lightbox[hidden] { display: none; }

.lb-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;

  container-type: size;

  touch-action: pan-x;
}
.lb-slide .lb-media { touch-action: pan-x; }

.lb-slide.zoomed, .lb-slide.zoomed .lb-media { touch-action: none; }

.lb-loader { display: none; }
.lb-slide.lb-wait .lb-loader {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 3px solid rgba(124,58,237,0.18);
  border-top-color: rgba(124,58,237,0.65);
  pointer-events: none;
}
.lb-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}

.lb-player {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-stage {
  position: relative;
  aspect-ratio: var(--ar, 1.7778);
  width: min(100cqw, calc(100cqh * var(--ar, 1.7778)));
  max-width: 100%;
}

video.lb-media { display: block; width: 100%; height: 100%; }
.lb-vbig {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.lb-vbig svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 14px rgba(0,0,0,0.55)); }
.lb-player.playing .lb-vbig { display: none; }

.lb-vbar {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
}
.lb-vbar button {
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-player.playing .lb-vtoggle .i-play, .lb-player:not(.playing) .lb-vtoggle .i-pause { display: none; }
.lb-player.muted .i-sound, .lb-player:not(.muted) .i-muted { display: none; }
.lb-player.fs .i-fs, .lb-player:not(.fs) .i-unfs { display: none; }

.lb-player.fs { justify-content: center; background: #000; }
.lb-player.fs .lb-stage { width: min(100vw, calc(100vh * var(--ar, 1.7778))); }
.lb-vseek { flex: 1; min-width: 0; accent-color: #EC4899; }
.lb-vtime {
  color: #fff;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lb-btn {
  position: absolute;
  top: 15px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.32);
  border: none;
  padding: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  opacity: .8;
  z-index: 2;
  transition: background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover { background: rgba(0,0,0,.7); opacity: 1; }
.lb-close    { right: 15px; }
.lb-download { right: 67px; }
.lb-share    { right: 119px; }

.lb-counter {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: rgba(0,0,0,.32);
  border-radius: 999px;
  color: #fff;
  z-index: 2;
  transition: opacity .25s;
}

.lightbox:has(.lb-slide.zoomed) .lb-counter,
.lightbox:has(.lb-player.playing) .lb-counter {
  opacity: 0;
  pointer-events: none;
}
.lb-cbtn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
  transition: opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.lb-cbtn:hover { opacity: 1; }
.lb-cbtn:disabled { opacity: .25; cursor: default; }
.lb-count {
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: .9;
}

.lb-tools { display: none; }

@media (max-width: 600px), (pointer: coarse) and (max-height: 600px) {
  .lb-btn { display: none; }
  .lb-slide { padding-bottom: calc(8px + 48px + env(safe-area-inset-bottom)); }
  .lb-tools {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 0.35rem env(safe-area-inset-bottom);
  }
}

@media (pointer: coarse) and (max-height: 600px) {
  .lb-slide { padding: 8px 8px calc(8px + 48px + env(safe-area-inset-bottom)); }
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(124,58,237,0.4);
  z-index: 1000001;
  pointer-events: none;
  animation: copyToast 2s ease forwards;
}
@keyframes copyToast {
  0%        { opacity: 0; transform: translate(-50%, 8px); }
  12%, 75%  { opacity: 1; transform: translate(-50%, 0); }
  100%      { opacity: 0; transform: translate(-50%, -6px); }
}

.share-pop {
  position: fixed;
  top: 71px;
  right: 15px;
  width: min(92vw, 460px);
  background: #fff;
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 18px 60px rgba(0,0,0,.5);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
@media (max-width: 600px), (pointer: coarse) and (max-height: 600px) {
  .share-pop {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 92vw;
  }
}
.share-pop.hidden { display: none; }
.share-qr {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  height: auto;
  image-rendering: pixelated;
}
.share-qr.loading { visibility: hidden; }
.share-actions { display: flex; gap: 0.5rem; }
.share-actions button {
  border: none;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  padding: 0.45rem 1rem;
  border-radius: 999px;
}

#shareNative { font-size: 1.5rem; padding: 0.85rem 2.2rem; }
