/* =====================================================================
   NOMNAM — site design system (matches KAYAA Launcher: ember orange / deep black, depth)
   Used by index.html, library.html, fanart.html. Arcade/Music load it too for the shell.
   ===================================================================== */
:root {
  --bg: #070708;
  --bg-2: #0c0c0f;
  --panel: #111115;
  --panel-2: #16161b;
  --panel-3: #1c1c22;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f5f1ea;
  --text-2: #c9c3bb;
  --muted: #9a958e;
  --dim: #5f5b56;
  --orange: #ff2d3f;
  --orange-2: #ff5c6a;
  --amber: #ffb648;
  --ember: #c8102e;
  --glow: rgba(255, 45, 63, .45);
  --accent-rgb: 255, 45, 63;
  --on-accent: #fff;
  --ok: #37d67a;
  --bad: #ff5147;
  --suika: #ff4f7b;
  --suika-2: #45d07a;
  --hina: #ffcc4d;
  --hina-2: #ff9f6b;
  --r: 18px;
  --display: "Unbounded", "Kanit", system-ui, sans-serif;
  --font: "Inter", "Kanit", system-ui, sans-serif;
  --thai: "Kanit", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 30px 60px -30px rgba(0, 0, 0, .95), 0 2px 8px rgba(0, 0, 0, .35);
  --wrap: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--orange); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 3px; border-radius: 8px; }

/* ---------- backdrop (depth layers) ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg::before, .bg::after { content: ""; position: absolute; border-radius: 50%; }
.bg::before { width: 1100px; height: 900px; left: -420px; top: -460px; background: radial-gradient(closest-side, rgba(255, 30, 55, .5), transparent); }
.bg::after { width: 1000px; height: 1000px; right: -480px; top: 30vh; background: radial-gradient(closest-side, rgba(200, 16, 46, .22), transparent); }
.bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 40% 0%, #000, transparent 70%); }
.bg-noise { position: absolute; inset: 0; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
canvas.embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@keyframes drift { to { transform: translate(70px, 50px) scale(1.08); } }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin: 0 auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px max(20px, calc((100% - var(--wrap)) / 2));
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.stuck { background: rgba(10, 8, 9, .86); backdrop-filter: blur(8px); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 800 16px var(--display); letter-spacing: .06em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 8px 20px -6px var(--glow); background: var(--panel-3); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.nav-links a { position: relative; padding: 8px 15px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 6px 14px -8px #000; }
.nav-links a.active::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 3px; height: 2px; border-radius: 2px; background: var(--orange); box-shadow: 0 0 10px var(--glow); }
.nav-links .new { font: 700 8.5px var(--display); letter-spacing: .08em; color: var(--on-accent); background: var(--orange); padding: 2px 5px; border-radius: 5px; margin-left: 5px; vertical-align: 2px; }
.nav-end { display: flex; gap: 8px; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); margin-left: auto; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; margin: 0 auto; position: relative; transition: .25s; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; }
.nav-burger span::before { top: -6px; } .nav-burger span::after { top: 6px; }

/* ---------- buttons / chips ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 13px; font-weight: 700; font-size: 14.5px; white-space: nowrap;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 8px 18px -10px #000;
  transition: transform .2s var(--ease), box-shadow .25s, border-color .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .22); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  overflow: hidden; isolation: isolate; color: var(--on-accent); border-color: rgba(255, 170, 178, .5);
  background: linear-gradient(180deg, #ff6b78, var(--orange) 55%, var(--ember));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 -2px 0 rgba(110, 0, 18, .3) inset, 0 14px 30px -10px var(--glow);
}
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 48%, transparent 62%); transform: translateX(-120%); }
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 -2px 0 rgba(110, 0, 18, .3) inset, 0 20px 40px -10px rgba(255, 45, 63, .6); }
.btn-primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 600 11px var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--orange-2); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--orange); box-shadow: 0 0 10px var(--glow); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--text-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.chip.orange { color: var(--orange-2); background: rgba(255, 45, 63, .1); border-color: rgba(255, 45, 63, .28); }
.chip.ok { color: var(--ok); background: rgba(55, 214, 122, .08); border-color: rgba(55, 214, 122, .25); }
.tag-new { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font: 800 10px var(--display); letter-spacing: .12em; color: var(--on-accent); background: linear-gradient(180deg, #ffd27a, var(--amber)); box-shadow: 0 0 20px -4px rgba(255, 182, 72, .7); animation: pulseNew 2.4s ease-in-out infinite; }
@keyframes pulseNew { 50% { box-shadow: 0 0 30px 0 rgba(255, 182, 72, .9); } }

/* ---------- sections ---------- */
.section { padding: 80px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.h1 { font: 800 clamp(40px, 6.4vw, 78px)/1.02 var(--display); letter-spacing: -.03em; }
.h2 { font: 700 clamp(26px, 3.4vw, 40px)/1.12 var(--display); letter-spacing: -.02em; margin-top: 10px; }
.h3 { font: 700 19px var(--display); letter-spacing: -.01em; }
.lead { color: var(--text-2); font-size: 17px; max-width: 560px; margin-top: 18px; font-family: var(--thai); font-weight: 300; }
.accent { color: var(--orange); text-shadow: 0 0 50px var(--glow); }
.muted { color: var(--muted); }
.see-all { color: var(--muted); font-weight: 600; font-size: 14px; transition: color .2s; }
.see-all:hover { color: var(--orange-2); }

/* ---------- cards ---------- */
.card {
  position: relative; border-radius: var(--r); padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)), var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tilt { transform-style: preserve-3d; transform: perspective(1000px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(var(--ty, 0)); transition: transform .4s var(--ease), box-shadow .4s, border-color .4s; }
.tilt:hover { --ty: -6px; border-color: rgba(255, 45, 63, .4); box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 40px 70px -30px #000, 0 24px 60px -30px var(--glow); }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 190, 196, .16), transparent 55%); }
.tilt:hover .glare { opacity: 1; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 40px; min-height: calc(100vh - 80px); padding: 30px 0 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 36px; }
.hero-meta div b { display: block; font: 800 24px var(--display); }
.hero-meta div span { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.socials { display: flex; gap: 8px; margin-top: 30px; }
.social { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: .25s var(--ease); }
.social svg { width: 19px; height: 19px; }
.social:hover { transform: translateY(-3px); border-color: rgba(255, 45, 63, .45); color: var(--orange-2); box-shadow: 0 12px 26px -12px var(--glow); }

.stage { position: relative; perspective: 1400px; height: 540px; }
.device { will-change: transform;
  position: absolute; right: 0; top: 50%; width: 118%; max-width: 760px;
  transform: translateY(-50%) rotateY(-16deg) rotateX(6deg) rotateZ(1deg);
  transform-style: preserve-3d; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 60px 120px -40px #000, 0 0 0 1px rgba(0, 0, 0, .6), -30px 30px 100px -30px rgba(255, 45, 63, .45);
  animation: deviceFloat 7s ease-in-out infinite;
}
.device img { width: 100%; }
.device::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .14), transparent 32%); pointer-events: none; }
@keyframes deviceFloat { 50% { transform: translateY(calc(-50% - 12px)) rotateY(-14deg) rotateX(5deg) rotateZ(1deg); } }
.float-card {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: 15px;
  background: rgba(20, 16, 17, .94); border: 1px solid var(--line-2);
  box-shadow: 0 24px 44px -18px #000; font-size: 13px; animation: bob 5s ease-in-out infinite;
}
.float-card b { display: block; font-weight: 700; font-size: 13.5px; }
.float-card small { color: var(--muted); font-size: 11.5px; }
.float-card .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, var(--amber), var(--orange)); color: var(--on-accent); font-weight: 800; }
.float-card.f1 { left: -10px; top: 40px; }
.float-card.f2 { right: -8px; bottom: 36px; animation-delay: -2s; }
.float-card.f3 { left: 30px; bottom: -6px; animation-delay: -3.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.cube { position: absolute; transform-style: preserve-3d; will-change: transform; animation: bob 8s ease-in-out infinite, spin 30s linear infinite; }
.cube i { position: absolute; inset: 0; border: 1px solid rgba(255, 140, 150, .35); }
.cube i:nth-child(1) { transform: translateZ(var(--h)); background: linear-gradient(135deg, #ff6b78, var(--orange)); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(var(--h)); background: #2a060c; }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(var(--h)); background: linear-gradient(135deg, var(--ember), #4a0612); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(var(--h)); background: linear-gradient(135deg, #3a0a12, #140306); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(var(--h)); background: linear-gradient(135deg, #ff9aa3, var(--orange-2)); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(var(--h)); background: #0c0204; }
.cube.dark i:nth-child(1), .cube.dark i:nth-child(5) { background: linear-gradient(135deg, #2b2b33, #121216); border-color: rgba(255, 255, 255, .12); }
@keyframes spin { from { rotate: y 0deg; } to { rotate: y 360deg; } }

/* ---------- marquee ---------- */
.marquee { margin-top: 20px; overflow: hidden; border-block: 1px solid var(--line); background: rgba(255, 255, 255, .02); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 34px; width: max-content; padding: 16px 0; animation: marq 40s linear infinite; font: 700 15px var(--display); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.marquee-track i { color: var(--orange); font-style: normal; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- feature tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.tile { grid-column: span 4; overflow: hidden; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; }
.tile.wide { grid-column: span 8; }
.tile .art { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.tile .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover .art img { transform: scale(1.06); }
.tile .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 9, 9, .96) 8%, rgba(10, 9, 9, .4) 55%, rgba(10, 9, 9, .1)); }
.tile .body { position: relative; z-index: 2; }
.tile p { color: var(--text-2); font-size: 14px; margin-top: 8px; max-width: 460px; font-family: var(--thai); font-weight: 300; }
.tile .go { position: absolute; z-index: 2; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-2); transition: .3s var(--ease); }
.tile:hover .go { background: var(--orange); color: var(--on-accent); transform: rotate(-45deg); }
.tile .kicker { font: 700 10.5px var(--display); letter-spacing: .2em; color: var(--orange-2); text-transform: uppercase; }

/* ---------- live row (ids reused from the old site / script.js) ---------- */
.live-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.live-card { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .3s var(--ease), border-color .3s; animation: fadeUp .6s var(--ease) both; }
.live-card:hover { transform: translateY(-5px); border-color: rgba(255, 45, 63, .4); }
.live-thumb { position: relative; aspect-ratio: 16/9; background: var(--panel-3); overflow: hidden; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.live-card:hover .live-thumb img { transform: scale(1.06); }
.live-badge { position: absolute; top: 10px; left: 10px; font: 700 10px var(--display); letter-spacing: .1em; padding: 4px 8px; border-radius: 7px; background: rgba(0, 0, 0, .7); }
.live-badge.is-live { background: #e5322d; box-shadow: 0 0 20px rgba(229, 50, 45, .6); }
.live-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; opacity: 0; background: rgba(0, 0, 0, .3); transition: opacity .3s; }
.live-card:hover .live-play { opacity: 1; }
.live-info { padding: 13px 15px 15px; }
.live-title { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--thai); }
.live-sub { color: var(--muted); font-size: 12px; margin-top: 5px; }
.lives-empty { grid-column: 1/-1; padding: 36px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 16px; }
.lives-empty a { color: var(--orange-2); }
.skeleton .live-thumb, .sk-line { background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.4s infinite; }
.sk-line { display: block; height: 11px; border-radius: 6px; margin: 4px 0 8px; }
.sk-line.short { width: 55%; }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ---------- links ---------- */
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.link { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.link .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 20px -10px #000; }
.link .ico svg { width: 22px; height: 22px; }
.link .ico img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.link h3 { font: 700 16px var(--display); }
.link h3 small { display: block; font: 500 12px var(--font); color: var(--muted); margin-top: 3px; }
.link p { color: var(--text-2); font-size: 13px; font-family: var(--thai); font-weight: 300; }
.i-yt { background: linear-gradient(145deg, #ff4e45, #c4120a); } .i-tt { background: linear-gradient(145deg, #2a2a2e, #0d0d10); box-shadow: -2px -2px 0 #25f4ee inset, 2px 2px 0 #fe2c55 inset; }
.i-dc { background: linear-gradient(145deg, #7b8cff, #5865f2); } .i-dn { background: #fff; }

/* ---------- sponsor ---------- */
.sponsor { display: grid; grid-template-columns: 1fr 1.3fr; gap: 26px; align-items: center; padding: 26px; }
.sponsor-logo { width: 110px; border-radius: 20px; overflow: hidden; box-shadow: 0 16px 30px -12px #000; }
.sp-slide { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sp-slide img { border-radius: 14px; aspect-ratio: 3/4; object-fit: cover; box-shadow: 0 18px 30px -16px #000; transition: transform .4s var(--ease); }
.sp-slide img:nth-child(2) { transform: translateY(-14px); }
.sp-slide:hover img { transform: translateY(-6px) rotate(-1deg); }

/* ---------- footer ---------- */
.foot { margin-top: 110px; padding: 34px 0 60px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a:hover { color: var(--orange-2); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- mini lofi player (ids from script.js) ---------- */
.mini-lofi { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.ml-fab { width: 52px; height: 52px; border-radius: 16px; font-size: 20px; background: linear-gradient(180deg, #ff6b78, var(--orange)); color: var(--on-accent); box-shadow: 0 14px 30px -8px var(--glow); }
.ml-card { display: flex; align-items: center; gap: 11px; padding: 9px 10px 9px 9px; border-radius: 17px; background: rgba(18, 16, 15, .86); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: 0 24px 50px -18px #000; }
.ml-card[hidden], .ml-fab[hidden] { display: none; }
.ml-cover { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; }
.mini-lofi.playing .ml-cover { animation: spin2 6s linear infinite; border-radius: 50%; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.ml-meta { display: flex; flex-direction: column; min-width: 0; width: 132px; }
.ml-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.ml-btn svg { width: 16px; height: 16px; }
.ml-play { background: var(--orange); color: var(--on-accent); }
.ml-play .ic-pause, .mini-lofi.playing .ml-play .ic-play { display: none; }
.mini-lofi.playing .ml-play .ic-pause { display: block; }
.ml-close { width: 24px; height: 24px; border-radius: 8px; color: var(--muted); font-size: 12px; }

/* ---------- forms / modal / toast (library + fanart) ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input { width: 100%; height: 48px; padding: 0 15px; border-radius: 13px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line-2); outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: rgba(255, 45, 63, .65); box-shadow: 0 0 0 4px rgba(255, 45, 63, .14); }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .78); opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 24px; padding: 28px; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)), #121216; border: 1px solid var(--line-2); box-shadow: 0 60px 120px -40px #000; transform: translateY(18px) scale(.98); transition: transform .35s var(--ease); }
.modal.open .modal-box { transform: none; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .06); font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 140%); padding: 13px 18px; border-radius: 14px; background: #17161a; border: 1px solid var(--line-2); box-shadow: 0 20px 40px -14px #000; font-weight: 600; transition: transform .4s var(--ease); max-width: calc(100% - 40px); }
.toast.show { transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(55, 214, 122, .4); } .toast.err { border-color: rgba(255, 81, 71, .45); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 20px; }
  .stage { height: 360px; }
  .device { will-change: transform; width: 100%; right: 0; }
  .live-row { grid-template-columns: repeat(2, 1fr); }
  .links { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.wide { grid-column: span 12; }
  .sponsor { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-end { display: none; }
  .nav-burger { display: block; }
  .nav.menu-open { flex-wrap: wrap; background: rgba(8, 8, 10, .96); }
  .nav.menu-open .nav-links { display: flex; flex-direction: column; width: 100%; order: 3; margin: 8px 0 0; }
  .nav.menu-open .nav-links a { padding: 13px 15px; }
  .nav.menu-open .nav-end { display: flex; width: 100%; order: 4; }
  .nav.menu-open .nav-end .btn { flex: 1; }
  .section { padding-top: 60px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .links { grid-template-columns: 1fr; }
  .live-row { grid-template-columns: 1fr; }
  .stage { height: 280px; }
  .float-card.f2, .float-card.f3 { display: none; }
  .hero-meta { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* hero copy stays above the tilted screenshot */
.hero > .reveal:first-child { position: relative; z-index: 4; }
.device { will-change: transform; width: 104%; }

.brand-mark { background: #fff; }

/* red theme: gold NEW badges keep dark text */
.tag-new { color: #1a0900; }
.btn-primary { text-shadow: 0 1px 0 rgba(90, 0, 12, .35); }

/* perf: skip rendering off-screen sections until needed */
.section { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* brand mark = red KAYAA K logo (transparent png, already rounded) */
.brand-mark { background: transparent !important; box-shadow: none; overflow: visible; filter: drop-shadow(0 6px 14px rgba(255, 45, 63, .45)); }
.brand-mark img { object-fit: contain; }
/* K marks use the red logo gradient */
.float-card.f1 .ic, .logo-k { background: linear-gradient(145deg, #ff8a95, #ff2d3f 45%, #c8102e) !important; color: #fff !important; }

/* hidden corner button → /secret (deliberately hard to notice; bigger hit area than it looks) */
.secret-dot { position: fixed; top: 0; right: 0; z-index: 60; width: 22px; height: 22px; display: grid; place-items: center; }
.secret-dot::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text); opacity: .09; transition: opacity .4s, box-shadow .4s; }
.secret-dot:hover::after, .secret-dot:focus-visible::after { opacity: .7; box-shadow: 0 0 10px var(--glow); }
@media (max-width: 760px) { .secret-dot { width: 16px; height: 16px; } }
