/* pixel UI layer: Lucid masks, red-button section, gallery switch, fake terminal, Lain overlay, confetti */
.lu { display:inline-block; width:1em; height:1em; background:currentColor; -webkit-mask:var(--m) center / contain no-repeat; mask:var(--m) center / contain no-repeat; vertical-align:-.125em; flex:none; pointer-events:none; }
.mode .lu, .ctl .lu { width:26px; height:26px; }
.mode#musicBtn.on .lu { animation:notebob 1s steps(2) infinite; }
@keyframes notebob { 50% { transform:translateY(-2px); } }
@media (prefers-reduced-motion:reduce) { .mode#musicBtn.on .lu { animation:none; } }
.wa-btns button .lu { width:14px; height:14px; } .wa-volw .lu { width:20px; height:20px; }
.gnav .lu, .lbb .lu { width:24px; height:24px; } #totop .lu { width:24px; height:24px; }
.term-btn .lu { width:16px; height:16px; }
.pxd { width:24px; height:24px; image-rendering:pixelated; vertical-align:middle; flex:none; }
.stm-tab .pxd { margin-right:6px; }
.gtog .stm-tab .lu { width:18px; height:18px; margin-right:6px; vertical-align:-3px; }

/* big red button, now living at the bottom of the page */
.rbs { margin:var(--s6, 40px) 0 var(--s5, 24px); }
.rbs-note { margin:0 0 12px; color:var(--mut); font:16px/20px Mc, monospace; }
.rbs-host { display:flex; justify-content:center; padding:8px 0 16px; }
.rbs-host .rb-card { box-shadow:6px 6px 0 var(--acc); }
.rbs-host .rb-card { width:min(340px, 100%); }

/* gallery switch */
.gtog { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 12px; }
.gtog[hidden], .gtog button[hidden] { display:none; }
.gtog .stm-tab { display:inline-flex; align-items:center; }
.gtog .stm-tab.on, .gtog .stm-tab[aria-pressed="true"] { border-color:var(--acc); color:var(--acc); background:color-mix(in srgb, var(--acc) 14%, transparent); }
.qlogos .qi.gl img { height:150px; width:auto; max-width:none; object-fit:contain; padding:6px 10px; background:none; }
.qlogos { gap:30px; }
.lb.lb-logo figure { background:#0b0b0b; padding:12px; } .lb.lb-logo img { max-width:92vw; max-height:78vh; object-fit:contain; background:#0b0b0b; }

/* fake terminal */
.ftm { position:fixed; inset:0; z-index:100001; display:grid; place-items:center; padding:16px; background:rgba(0, 0, 0, .66); }
.ftm[hidden] { display:none; }
.ftm-win { display:flex; flex-direction:column; width:min(760px, 100%); height:min(520px, calc(100dvh - 32px)); background:#0b0b0b; border:2px solid var(--ink); border-radius:var(--w1, 0); box-shadow:6px 6px 0 var(--acc); overflow:hidden; color:#d6f5d6; }
.ftm-win .term-bar { flex:none; }
.ftm-out { flex:1; min-height:0; overflow:auto; padding:10px 12px 0; font:16px/20px Mc, monospace; }
.ftm-l { white-space:pre-wrap; overflow-wrap:anywhere; } .ftm-l b { color:var(--acc); font-weight:400; } .ftm-l.lain { color:#ff7bd6; }
.ftm-in { flex:none; display:flex; gap:0; align-items:center; padding:6px 12px 10px; font:16px/20px Mc, monospace; }
.ftm-in b { color:var(--acc); font-weight:400; white-space:pre; }
.ftm-in input { flex:1; min-width:0; padding:0; border:0; outline:0; background:none; color:inherit; font:inherit; caret-color:var(--acc); }
.term-x { font-family:Mc, monospace; }

/* Lain takes over the screen: every gif keeps playing, 10 seconds, then fades */
.lain-ov { position:fixed; inset:0; z-index:100000; pointer-events:none; overflow:hidden; transition:opacity .7s ease; }
.lain-ov.out { opacity:0; }
.lain-ov img { position:absolute; height:auto; opacity:0; animation:lainIn .35s steps(4) forwards; image-rendering:auto; filter:drop-shadow(3px 3px 0 rgba(0, 0, 0, .55)); }
@keyframes lainIn { from { opacity:0; transform:scale(.6); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) { .lain-ov img { animation:none; opacity:1; } }

/* confetti canvas (red button milestone) */
.fun-confetti { position:fixed; inset:0; width:100vw; height:100vh; z-index:100003; pointer-events:none; }

/* trophy cups (achievements): the Lucid-style trophy, tinted per tier through the same --c2 variable the tiers already set */
.lu.ach-cup { background:var(--c2, currentColor); vertical-align:middle; }

/* section button: magnet translate is driven from JS, so it must not be eased by CSS; the icon is the Lucid list */
#totop { transition-property:opacity, background-color, color, border-color; will-change:translate; }
#totop:hover { transform:none; }
#totop .lu { width:26px; height:26px; }

/* billboard: one letter lights up at a time, the rest stay dim (the old rules forced every letter to full brightness) */
main .chat-hint .ch-txt.run .ch-l { color:#8a5a44; text-shadow:0 3px 0 #2a0505; opacity:1; }
main .chat-hint .ch-txt.run .ch-l.on { color:#fffbe0; text-shadow:0 0 6px #ffd36a, 0 0 16px #ffb52e, 0 3px 0 #5a0d0d; }

/* case back: gradient from the cover art. the back photo is screen-blended on top, so its black area takes the colour while barcode, logos and small print stay as they are */
.mi-face.mi-bk.bk-pal { background:url("../assets/img/bd-back.webp") center / 100% 100% no-repeat, var(--bk-g); background-blend-mode:screen, normal; }
.mi-bk.bk-pal .bk-m { color:var(--bk-acc); }

/* link boxes (Telegram, Discord...): the small pixel font left the boxes half empty, so the text now fills them and the old indent is gone */
.topbar .rt { gap:3px; }
.topbar .rt b { font-size:clamp(22px, 2.5vw, 30px); line-height:1.05; }
.topbar .rt small { margin:0; font-size:clamp(18px, 2.1vw, 24px); line-height:1.05; }

/* side button (back to top / sections): holographic rainbow foil on top of the button, with a glint that sweeps across now and then */
#totop { overflow:hidden; isolation:isolate; }
#totop::before, #totop::after { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; }
#totop::before { z-index:2; background:repeating-linear-gradient(115deg, #ff4d6d 0, #ffb347 20px, #fff275 40px, #6dff8f 60px, #55d6ff 80px, #8f7bff 100px, #ff6ad5 120px, #ff4d6d 140px) 0 0 / 309px 100%; mix-blend-mode:color; opacity:.85; }
#totop::after { z-index:3; background:linear-gradient(115deg, transparent 40%, rgba(255,255,255,.7) 50%, transparent 60%) -150% 0 / 100% 100% no-repeat; mix-blend-mode:overlay; }
@media (prefers-reduced-motion:no-preference) {
  #totop::before { animation:foilflow 5s linear infinite; }
  #totop::after { animation:foilglint 3.2s ease-in-out infinite; }
}
@keyframes foilflow { to { background-position:154.5px 0; } }
@keyframes foilglint { 0%, 35% { background-position:-150% 0; } 75%, 100% { background-position:150% 0; } }
