@import url("/static/fonts/fonts.css");

:root {
  --bg: #09090b;
  --bg-2: #0f0f12;
  --panel: #141418;
  --panel-2: #1a1a20;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f2ed;
  --muted: #a8a29e;
  --faint: #6b6762;
  --coral: #ff5f6d;
  --amber: #ffc371;
  --sig: linear-gradient(100deg, #ff5f6d 0%, #ff8a5c 45%, #ffc371 100%);
  --viz: #47a9ff;
  --prog: #ff5f6d;
  --led: #4cffb0;
  --radius: 18px;
  --radius-lg: 28px;
  --display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: min(1200px, calc(100vw - 40px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(255, 95, 109, 0.35); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.wrap { width: var(--page); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sig-text { background: var(--sig); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px) saturate(140%);
  background: linear-gradient(to bottom, rgba(9, 9, 11, 0.86), rgba(9, 9, 11, 0.6)); border-bottom: 1px solid var(--line);
}
.nav-in { width: var(--page); margin-inline: auto; display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--sig); display: grid; place-items: center; box-shadow: 0 6px 20px -6px rgba(255, 95, 109, 0.7); }
.brand-mark span { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.brand-mark i { width: 3px; background: #1a0d10; border-radius: 2px; animation: eq 1.1s var(--ease) infinite alternate; }
.brand-mark i:nth-child(1) { height: 60%; animation-delay: -0.2s; }
.brand-mark i:nth-child(2) { height: 100%; animation-delay: -0.6s; }
.brand-mark i:nth-child(3) { height: 40%; animation-delay: -0.9s; }
.brand-mark i:nth-child(4) { height: 80%; animation-delay: -0.4s; }
@keyframes eq { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.brand-mark i { transform-origin: bottom; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { font: 600 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line-2); padding: 8px 10px; border-radius: 999px; }
.lang:hover { color: var(--text); border-color: var(--muted); }
.gh { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--muted); }
.gh:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.gh svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; line-height: 1; cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sig { background: var(--sig); color: #1b0c0f; box-shadow: 0 10px 30px -10px rgba(255, 95, 109, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-sig:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255, 120, 100, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-ghost { border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.07); transform: translateY(-2px); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 500 12.5px/1.2 var(--body); border: 1px solid var(--line-2); color: var(--muted); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-visualizer { color: var(--viz); border-color: rgba(71, 169, 255, 0.35); }
.chip-progress { color: var(--prog); border-color: rgba(255, 95, 109, 0.35); }
.chip-led { color: var(--led); border-color: rgba(76, 255, 176, 0.35); }
.chip-plain::before { display: none; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 820px; pointer-events: none; z-index: -1;
  background: radial-gradient(40% 50% at 18% 30%, rgba(255, 95, 109, 0.22), transparent 70%),
              radial-gradient(35% 45% at 82% 20%, rgba(255, 195, 113, 0.14), transparent 70%),
              radial-gradient(50% 40% at 50% 90%, rgba(71, 169, 255, 0.10), transparent 70%); filter: blur(10px); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  padding: 8px 14px 8px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.03); }
.kicker b { width: 8px; height: 8px; border-radius: 50%; background: var(--led); box-shadow: 0 0 12px var(--led); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero h1 { font: 800 clamp(48px, 9vw, 132px)/0.92 var(--display); letter-spacing: -0.045em; margin: 26px 0 0; }
.hero h1 .line2 { display: block; padding-bottom: 0.08em; }
.hero-top { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: end; }
.hero-sub { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: #d6d1ca; max-width: 34em; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 16px; font: 400 13px/1.4 var(--mono); color: var(--faint); }

/* the desktop with MusicBar on its taskbar */
.stage { margin-top: 56px; position: relative; }
.screen {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 7.2; min-height: 300px;
  border: 1px solid var(--line-2); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 8px rgba(255, 255, 255, 0.02);
  background: #0c0b10;
}
.wallpaper { position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 20% 25%, #3b1d3f 0%, transparent 60%), radial-gradient(55% 70% at 85% 30%, #12304a 0%, transparent 65%),
              radial-gradient(70% 60% at 55% 110%, #4a2414 0%, transparent 60%), linear-gradient(160deg, #120f19, #0a0c12); }
.wallpaper::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 60%); }
.desk-window { position: absolute; left: 8%; top: 12%; width: 44%; height: 58%; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(30, 28, 38, 0.82), rgba(18, 17, 24, 0.82)); backdrop-filter: blur(6px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7); }
.desk-window .bar3 { display: flex; gap: 7px; padding: 14px 16px; }
.desk-window .bar3 i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.desk-window .lines { padding: 6px 18px; display: grid; gap: 10px; }
.desk-window .lines i { display: block; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); }
.desk-window .lines i:nth-child(2) { width: 78%; } .desk-window .lines i:nth-child(3) { width: 64%; } .desk-window .lines i:nth-child(4) { width: 82%; }
.desk-note { position: absolute; right: 7%; top: 16%; width: 26%; padding: 16px 18px; border-radius: 14px; background: rgba(15, 14, 20, 0.72); border: 1px solid rgba(255, 255, 255, 0.09);
  font: 500 12.5px/1.5 var(--mono); color: var(--muted); backdrop-filter: blur(8px); }
.desk-note b { color: var(--text); font-weight: 600; }

.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 13%; min-height: 44px; display: flex; align-items: center; }
.taskbar-bg { position: absolute; inset: 0; background: rgba(12, 12, 16, 0.35); backdrop-filter: blur(18px) saturate(160%); border-top: 1px solid rgba(255, 255, 255, 0.07); transition: background 0.4s; }
.taskbar[data-clear="1"] .taskbar-bg { background: rgba(12, 12, 16, 0.02); backdrop-filter: none; }
#bar-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tb-icons { position: relative; margin: 0 auto; display: flex; gap: 6px; z-index: 2; }
.tb-icons span { width: clamp(22px, 2.6vw, 34px); height: clamp(22px, 2.6vw, 34px); border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); }
.tb-icons span svg { width: 58%; height: 58%; }
.tb-player { position: absolute; z-index: 3; right: 12.5%; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; height: 76%; max-width: 32%; }
.tb-art { height: 100%; aspect-ratio: 1; border-radius: 7px; background: conic-gradient(from 210deg, #ff5f6d, #ffc371, #47a9ff, #b26cff, #ff5f6d); box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.6); }
.tb-lyric { font: 600 clamp(11px, 1.15vw, 15px)/1.15 var(--body); white-space: nowrap; overflow: hidden; text-overflow: clip; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.tb-lyric .w { color: rgba(255, 255, 255, 0.45); transition: color 0.18s; }
.tb-lyric .w.on { color: #fff; }
.tb-ctl { display: flex; gap: 2px; color: rgba(255, 255, 255, 0.85); }
.tb-ctl svg { width: clamp(12px, 1.2vw, 16px); height: clamp(12px, 1.2vw, 16px); }
.tb-tray { position: absolute; right: 1.6%; top: 50%; transform: translateY(-50%); z-index: 2; font: 500 clamp(9px, 0.95vw, 12px)/1.25 var(--body); text-align: right; color: rgba(255, 255, 255, 0.85); }

.stage-controls { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; margin-top: 22px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 9px 15px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 14px; transition: color 0.2s, background 0.2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: #140a0c; background: var(--text); }
.swatches { display: flex; gap: 8px; align-items: center; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.2s var(--ease); }
.swatches button:hover { transform: scale(1.12); }
.swatches button[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
.toggle-clear { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.toggle-clear input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background 0.2s; }
.toggle-clear input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.25s var(--ease), background 0.2s; }
.toggle-clear input:checked { background: var(--coral); border-color: var(--coral); }
.toggle-clear input:checked::after { transform: translateX(18px); background: #fff; }

/* ------------------------------------------------------------------ sections */
.section { padding: 120px 0 0; }
.section-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 48px; }
.eyebrow { font: 500 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.h2 { font: 800 clamp(34px, 5vw, 64px)/1.02 var(--display); letter-spacing: -0.035em; margin: 0; max-width: 16em; }
.lead { color: var(--muted); font-size: 18px; max-width: 36em; margin: 18px 0 0; }

/* bento of features */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(220px, auto); gap: 16px; }
.tile { position: relative; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--panel); overflow: hidden; padding: 28px; display: flex; flex-direction: column;
  isolation: isolate; transition: border-color 0.3s; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 160, 120, 0.12), transparent 60%); }
.tile:hover { border-color: var(--line-2); }
.tile:hover::before { opacity: 1; }
.tile h3 { font: 700 23px/1.15 var(--display); letter-spacing: -0.02em; margin: auto 0 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 30em; }
.t-lyrics { grid-column: span 4; grid-row: span 2; }
.t-styles { grid-column: span 2; grid-row: span 2; }
.t-skins { grid-column: span 3; }
.t-face { grid-column: span 3; }
.t-clear { grid-column: span 3; }
.t-light { grid-column: span 3; }
.tile-visual { flex: 1; min-height: 120px; margin: -4px -4px 22px; border-radius: 16px; position: relative; overflow: hidden; }

.karaoke { display: grid; gap: 10px; align-content: center; height: 100%; padding: 10px 6px; font: 700 clamp(22px, 3vw, 40px)/1.15 var(--display); letter-spacing: -0.02em; }
.karaoke .row { color: rgba(255, 255, 255, 0.16); transition: color 0.5s, transform 0.5s var(--ease); }
.karaoke .row .w { transition: color 0.2s; }
.karaoke .row.now { color: rgba(255, 255, 255, 0.4); transform: translateX(6px); }
.karaoke .row.now .w.on { color: #fff; text-shadow: 0 0 24px rgba(255, 150, 110, 0.55); }
.karaoke .roman { font: 500 14px/1 var(--mono); color: var(--amber); letter-spacing: 0.04em; opacity: 0.85; }
.mini-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.code { margin: 0; padding: 18px 20px; font: 400 13px/1.7 var(--mono); color: #cfc9c1; background: #0d0d10; border-radius: 16px; border: 1px solid var(--line); overflow: auto; height: 100%; white-space: pre; }
.code .k { color: #ff8a8a; } .code .f { color: #ffc371; } .code .c { color: #6b6762; } .code .n { color: #8fd3ff; }
.face { width: 150px; height: 108px; margin: 10px auto 0; position: relative; }
.face .head { position: absolute; inset: 0; border-radius: 46% 46% 42% 42%; background: linear-gradient(180deg, #2a2730, #1a181e); border: 2px solid rgba(255, 255, 255, 0.12); }
.face .eye { position: absolute; top: 38%; width: 17px; height: 24px; border-radius: 50%; background: #fff; animation: blink 4.2s infinite; box-shadow: 0 0 18px rgba(255, 255, 255, 0.4); }
.face .eye.l { left: 30%; } .face .eye.r { right: 30%; }
.face .mouth { position: absolute; left: 50%; top: 66%; width: 24px; height: 12px; margin-left: -12px; border-radius: 0 0 14px 14px; background: var(--coral); animation: sing 0.5s infinite alternate; transform-origin: top; }
.face .mic { position: absolute; right: -6px; bottom: 6px; width: 12px; height: 46px; border-radius: 6px; background: linear-gradient(#e8e4dd 0 36%, #3a3740 36%); transform: rotate(-24deg); }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes sing { from { transform: scaleY(0.35); } to { transform: scaleY(1.15); } }
.notes { position: absolute; inset: 0; pointer-events: none; }
.notes i { position: absolute; font-style: normal; color: var(--amber); font-size: 18px; animation: float 3s linear infinite; opacity: 0; }
.notes i:nth-child(2) { left: 64%; animation-delay: 1s; color: var(--coral); } .notes i:nth-child(3) { left: 30%; animation-delay: 2s; color: var(--viz); }
.notes i:nth-child(1) { left: 72%; }
@keyframes float { 0% { transform: translateY(90px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-10px) rotate(14deg); opacity: 0; } }
.ram { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.ram b { font: 800 clamp(56px, 7vw, 92px)/0.9 var(--display); letter-spacing: -0.05em; }
.ram span { font: 500 14px/1.3 var(--mono); color: var(--muted); }
.spark { height: 64px; margin-top: 12px; }
.clear-demo { display: grid; gap: 10px; align-content: center; height: 100%; }
.clear-demo .tbar { height: 34px; border-radius: 10px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.clear-demo .tbar.solid { background: #1f1e24; }
.clear-demo .tbar.clear { background: linear-gradient(90deg, #3b1d3f, #12304a 60%, #4a2414); }
.clear-demo .tbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 64%; background: var(--sig); opacity: 0.85; animation: grow 6s var(--ease) infinite; }
.clear-demo .tbar.solid i { opacity: 0; }
.clear-demo label { font: 500 12px/1 var(--mono); color: var(--faint); letter-spacing: 0.05em; }
@keyframes grow { from { width: 5%; } to { width: 92%; } }

/* ------------------------------------------------------------------ gallery cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.card { position: relative; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s; isolation: isolate; }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent, #ff5f6d) 18%, transparent), transparent 55%); }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent, #ff5f6d) 40%, transparent); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent, #ff5f6d) 55%, transparent); }
.card:hover::after { opacity: 1; }
.card-media { position: relative; aspect-ratio: 16 / 3.6; background: #060608; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media .scene { position: absolute; inset: 0; background: radial-gradient(80% 140% at 25% 0%, color-mix(in srgb, var(--accent, #ff5f6d) 26%, transparent), transparent 70%), linear-gradient(180deg, #121118, #08080b); }
.card-media .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; background: #050507; overflow: hidden; }
.card-media .strip img, .card-media .strip video, .card-media .strip canvas { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.card-media .strip::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); pointer-events: none; }
.card-media .noprev { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font: 500 12px/1 var(--mono); }
.card-body { padding: 18px 20px 20px; display: grid; gap: 10px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title h3 { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: -0.015em; }
.card-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.card-meta .by b { color: var(--text); font-weight: 600; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.15); }
.card-link { position: absolute; inset: 0; z-index: 1; }
.card .dl { position: relative; z-index: 2; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--muted); background: rgba(255, 255, 255, 0.03); transition: color 0.2s, border-color 0.2s, background 0.2s; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); background: rgba(255, 255, 255, 0.08); }
.icon-btn svg { width: 18px; height: 18px; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(340px, 380px); gap: 18px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

/* ------------------------------------------------------------------ gallery page */
.page-head { padding: 72px 0 36px; }
.page-head h1 { font: 800 clamp(44px, 7vw, 96px)/0.95 var(--display); letter-spacing: -0.045em; margin: 0; }
.page-head p { color: var(--muted); font-size: 18px; max-width: 40em; margin: 18px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 28px; }
.filters form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg a { padding: 9px 15px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; }
.seg a:hover { color: var(--text); }
.seg a[aria-current="true"] { color: #140a0c; background: var(--text); }
.field { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); border-radius: 12px; padding: 11px 14px; min-width: 0; }
.field:focus { outline: none; border-color: var(--amber); }
select.field { padding-right: 34px; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 40px 0 0; }
.empty { padding: 80px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }

/* ------------------------------------------------------------------ item page */
.item-hero { padding: 48px 0 0; }
.back { color: var(--muted); font-size: 14px; }
.back:hover { color: var(--text); }
.item-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; margin-top: 22px; align-items: start; }
.item-grid > *, .form-grid > *, .dl-grid > * { min-width: 0; }
.item-preview { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-2); position: relative; aspect-ratio: 16 / 5.2; background: #060608; }
.item-preview .wallpaper { opacity: 0.85; }
.item-preview .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; min-height: 56px; background: rgba(5, 5, 7, 0.8); border-top: 1px solid rgba(255, 255, 255, 0.07); }
.item-preview .strip img, .item-preview .strip video, .item-preview .strip canvas { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.panel { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--panel); padding: 26px; }
.panel h1 { font: 800 clamp(32px, 4vw, 46px)/1.02 var(--display); letter-spacing: -0.035em; margin: 10px 0 8px; }
.panel .by { color: var(--muted); }
.panel .by b { color: var(--text); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 22px 0; font-size: 14.5px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; }
.swatch-row { display: flex; gap: 6px; align-items: center; }
.swatch-row i { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.15); }
.howto { margin-top: 18px; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); font-size: 14.5px; color: #d6d1ca; display: grid; gap: 8px; }
.safe { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.safe svg { width: 18px; height: 18px; color: var(--led); flex: none; margin-top: 2px; }
.source { margin-top: 28px; }
.source h2 { font: 700 22px/1.2 var(--display); margin: 0 0 12px; }
.source pre { max-height: 520px; counter-reset: ln; }

/* ------------------------------------------------------------------ download */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dl-card { border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); padding: 30px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.dl-card.main::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--sig); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.dl-card h2 { margin: 0; font: 800 34px/1 var(--display); letter-spacing: -0.03em; }
.dl-card p { margin: 0; color: var(--muted); }
.dl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hash { display: flex; align-items: center; gap: 8px; font: 400 12px/1.4 var(--mono); color: var(--faint); word-break: break-all; }
.hash button { border: 1px solid var(--line-2); background: none; border-radius: 8px; padding: 4px 8px; cursor: pointer; color: var(--muted); font: 500 11px/1 var(--mono); flex: none; }
.hash button:hover { color: var(--text); }
.notes-md { color: #d6d1ca; font-size: 15px; }
.notes-md h3 { font: 700 18px/1.2 var(--display); margin: 22px 0 8px; color: var(--text); }
.notes-md ul { padding-left: 20px; margin: 6px 0; }
.notes-md li { margin: 6px 0; }
.notes-md strong { color: var(--text); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(255, 195, 113, 0.25); background: rgba(255, 195, 113, 0.06); color: #e9dfcf; font-size: 14.5px; }
.callout svg { width: 20px; height: 20px; flex: none; color: var(--amber); margin-top: 1px; }

/* ------------------------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: 14px; color: #d6d1ca; font-weight: 500; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 34px 20px; border: 1.5px dashed var(--line-2); border-radius: 18px; background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: border-color 0.2s, background 0.2s; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--amber); background: rgba(255, 195, 113, 0.05); }
.drop b { color: var(--text); font-weight: 600; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; color: var(--muted) !important; }
.check input { margin-top: 4px; accent-color: var(--coral); }
.side { display: grid; gap: 14px; }
.side .panel h3 { font: 700 18px/1.2 var(--display); margin: 0 0 10px; }
.side ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; display: grid; gap: 8px; }
.findings { display: grid; gap: 8px; margin: 18px 0; padding: 0; list-style: none; }
.findings li { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 14.5px; }
.findings li.block { border-color: rgba(255, 95, 109, 0.4); background: rgba(255, 95, 109, 0.07); }
.findings li.warn { border-color: rgba(255, 195, 113, 0.35); background: rgba(255, 195, 113, 0.06); }
.findings code { font: 400 12.5px/1.4 var(--mono); color: var(--muted); }

/* ------------------------------------------------------------------ cta + footer */
.cta-band { margin: 140px 0 0; padding: 72px 48px; border-radius: 36px; position: relative; overflow: hidden; border: 1px solid var(--line-2);
  background: radial-gradient(60% 120% at 0% 0%, rgba(255, 95, 109, 0.28), transparent 60%), radial-gradient(60% 120% at 100% 100%, rgba(255, 195, 113, 0.2), transparent 60%), var(--panel); }
.cta-band h2 { font: 800 clamp(38px, 6vw, 80px)/0.98 var(--display); letter-spacing: -0.045em; margin: 0; max-width: 12em; }
.cta-band p { color: #d6d1ca; font-size: 18px; margin: 16px 0 28px; }
.cta-band canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; opacity: 0.9; pointer-events: none; }
.footer { margin-top: 120px; border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
.footer-in { width: var(--page); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* ------------------------------------------------------------------ admin */
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 26px; }
.stat { padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); min-width: 130px; }
.stat b { display: block; font: 800 28px/1 var(--display); }
.stat span { font-size: 13px; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--faint); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.v-clean { color: var(--led); } .v-warn { color: var(--amber); } .v-block { color: var(--coral); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions form { display: contents; }
.btn-ok { background: rgba(76, 255, 176, 0.12); border-color: rgba(76, 255, 176, 0.4); color: var(--led); }
.btn-no { background: rgba(255, 95, 109, 0.1); border-color: rgba(255, 95, 109, 0.4); color: var(--coral); }

/* ------------------------------------------------------------------ motion */
/* Hidden only once the script runs (html loses .nojs): without it everything simply shows. */
html:not(.nojs) .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html:not(.nojs) .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html:not(.nojs) .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero-top, .item-grid, .form-grid, .dl-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .t-lyrics, .t-styles, .t-skins, .t-face, .t-clear, .t-light { grid-column: span 2; grid-row: auto; }
  .t-styles { min-height: 280px; }
  .section-head { grid-template-columns: 1fr; }
  .desk-note { display: none; }
  .tb-player { right: 4%; max-width: 46%; }
  .tb-tray { display: none; }
}
@media (max-width: 640px) {
  :root { --page: calc(100vw - 32px); }
  .nav-links { display: none; }
  .hero { padding-top: 44px; }
  .screen { aspect-ratio: 4 / 3; }
  .desk-window { width: 80%; left: 10%; }
  .tb-icons span:nth-child(n+5) { display: none; }
  .tb-player .tb-ctl { display: none; }
  .cta-band { padding: 48px 24px; }
  .form .row2 { grid-template-columns: 1fr; }
  .cards, .rail { grid-auto-columns: 86%; }
  .cards { grid-template-columns: 1fr; }
}
