/* PS-WRAP site · ชั้นเอฟเฟกต์ (โหลดหลัง style.css) */
:root { --violet: #6d5cff; --cyan: #5ad1ff; --red: #ff3b5c; }

/* noise grain ทั้งหน้า */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* แสงตามเมาส์ */
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 167, 255, .10), transparent 70%);
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0);
  transition: opacity .3s; opacity: 0;
}
body.has-pointer .cursor-glow { opacity: 1; }
main, .foot { position: relative; z-index: 1; }

/* ---- hero ---- */
.hero { overflow: hidden; background: var(--bg); padding-top: 96px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.aurora { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.a1 { width: 720px; height: 520px; left: 50%; top: -260px; margin-left: -560px; background: radial-gradient(circle, #0091ff, transparent 65%); animation: drift1 18s ease-in-out infinite alternate; }
.a2 { width: 620px; height: 520px; left: 50%; top: -180px; margin-left: 40px; background: radial-gradient(circle, var(--violet), transparent 65%); opacity: .45; animation: drift2 22s ease-in-out infinite alternate; }
.a3 { width: 520px; height: 420px; left: 50%; top: 260px; margin-left: -260px; background: radial-gradient(circle, #00e0ff, transparent 65%); opacity: .22; animation: drift1 26s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(120px, 60px, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-140px, 90px, 0) scale(.9); } }

/* พื้นตาราง perspective */
.floor {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 62%;
  background:
    linear-gradient(rgba(0, 167, 255, .22) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(0, 167, 255, .22) 1px, transparent 1px) 0 0 / 64px 64px;
  transform: perspective(520px) rotateX(62deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, transparent 0%, #000 30%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 30%, #000 55%, transparent 100%);
  animation: floor 6s linear infinite; opacity: .55;
}
@keyframes floor { to { background-position: 0 64px, 0 0; } }

/* วงแหวน wrap ยักษ์ (โลโก้) */
.ring {
  position: absolute; left: 50%; top: 20px; width: 820px; height: 820px; margin-left: -410px;
  opacity: .5; filter: drop-shadow(0 0 30px rgba(0, 167, 255, .55));
}
.ring circle { transform-origin: 128px 128px; transform-box: view-box; }
.ring-a { animation: spin 14s linear infinite; }
.ring-b { animation: spin 40s linear infinite reverse; }
.ring-c { animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-copy { position: relative; }
h1 { text-shadow: 0 10px 60px rgba(0, 0, 0, .5); }
h1 em {
  background: linear-gradient(100deg, var(--cyan) 0%, var(--accent) 35%, var(--violet) 60%, var(--cyan) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ปุ่ม: แสงวิ่ง + วงเต้น */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn:not(.btn-ghost)::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn:not(.btn-ghost):hover::after { transform: translateX(120%); transition: transform .7s ease; }
.btn-lg:not(.btn-ghost) {
  background: linear-gradient(135deg, #3cc4ff, var(--accent) 45%, #0077ff);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 167, 255, .5), 0 14px 40px -12px rgba(0, 167, 255, .8); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(0, 167, 255, 0), 0 14px 40px -12px rgba(0, 167, 255, .8); }
}
.btn-ghost { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(18, 26, 35, .5); }

/* ภาพ hero แบบ 3D */
.hero-shot { perspective: 1600px; margin-top: 64px; position: relative; }
.stage {
  position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 22deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, .94));
  transition: transform .15s linear;
}
.frame { position: relative; }
.glow { box-shadow: 0 60px 160px -40px rgba(0, 167, 255, .6), 0 0 0 1px rgba(0, 167, 255, .18), 0 0 80px -10px rgba(109, 92, 255, .35); }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ang { to { --ang: 360deg; } }
.frame::before, .dl-card::before {
  /* ขอบไล่สีวิ่งรอบ */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 2; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 68%, var(--accent) 80%, var(--violet) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ang 5s linear infinite;
}
.scan {
  position: absolute; left: 0; right: 0; top: 34px; height: 120px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 167, 255, .10), transparent);
  animation: scan 5.5s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateY(-120px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateY(620px); opacity: 0; } }
.live-dot { margin-left: auto; font: 700 11px/1 var(--font); letter-spacing: .1em; color: #fff; background: var(--red); padding: 4px 8px; border-radius: 6px; box-shadow: 0 0 16px rgba(255, 59, 92, .7); }

/* การ์ดลอยแบบกระจก */
.float {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px; white-space: nowrap;
  background: rgba(13, 19, 26, .62); border: 1px solid rgba(90, 209, 255, .22);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: translateZ(80px); animation: bob 6s ease-in-out infinite;
}
.float b { font: 700 18px/1 var(--font-display); }
.float .k { font: 650 11px/1 var(--font); letter-spacing: .12em; color: var(--muted); }
.f-a { left: -40px; top: 18%; flex-direction: column; align-items: flex-start; gap: 6px; }
.f-a b { font-size: 30px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.f-b { right: -36px; top: 10%; animation-delay: -1.5s; }
.f-c { left: -24px; bottom: 14%; animation-delay: -3s; }
.f-d { right: -30px; bottom: 22%; animation-delay: -4.5s; }
@keyframes bob { 0%, 100% { transform: translateZ(80px) translateY(0); } 50% { transform: translateZ(80px) translateY(-12px); } }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.red { background: var(--red); animation: ping 1.6s infinite; }
.dot.rec { background: var(--red); animation: blink 1.1s steps(2) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); } }
@keyframes blink { 50% { opacity: .15; } }
.bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars i { width: 4px; border-radius: 2px; background: #3ddc84; }
.bars i:nth-child(1) { height: 25%; } .bars i:nth-child(2) { height: 50%; } .bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }

/* ---- strip + marquee ---- */
.strip { position: relative; z-index: 1; margin-top: 0; background: rgba(15, 21, 28, .8); }
.strip b { background: linear-gradient(180deg, #fff, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.marquee {
  border-top: 1px solid var(--line); overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.track span { padding: 16px 28px; font: 650 14px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #5f7183; white-space: nowrap; }
.track span::after { content: "◆"; margin-left: 56px; color: var(--accent); opacity: .5; font-size: 9px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- bento ---- */
.grid { grid-auto-flow: dense; }
.card { position: relative; overflow: hidden; isolation: isolate; }
.card::before {
  /* spotlight ตามเมาส์ */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 167, 255, .16), transparent 60%);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(90, 209, 255, .9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { transform: translateY(-4px); border-color: var(--line); }
.card.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.card.half { grid-column: span 2; }
.viz { position: relative; }

.viz-ov { height: 190px; border-radius: 12px; background: linear-gradient(135deg, #1b2a38, #0d141b); border: 1px solid var(--line); overflow: hidden; }
.viz-ov::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 70%, rgba(255, 140, 60, .25), transparent 50%), radial-gradient(circle at 80% 20%, rgba(0, 167, 255, .2), transparent 50%); }
.ov { position: absolute; background: rgba(8, 12, 17, .72); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; padding: 7px 9px; font-size: 11px; line-height: 1.4; color: var(--text); }
.ov-clock { right: 10px; top: 10px; display: flex; gap: 8px; align-items: baseline; }
.ov-clock b { font: 650 16px/1 var(--font-display); }
.ov-clock span { color: #3ddc84; font-size: 10px; }
.ov-chat { left: 10px; top: 10px; display: grid; gap: 4px; width: 50%; }
.ov-chat span { display: flex; align-items: center; gap: 6px; opacity: 0; animation: chatin 6s infinite; }
.ov-chat span:nth-child(2) { animation-delay: 1s; } .ov-chat span:nth-child(3) { animation-delay: 2s; }
.ov-chat i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
@keyframes chatin { 0% { opacity: 0; transform: translateY(6px); } 8%, 80% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
.ov-stats { right: 10px; bottom: 10px; display: grid; gap: 2px; min-width: 104px; }
.ov-stats span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.ov-stats b { color: var(--cyan); }
.ov-mic { left: 10px; bottom: 10px; display: flex; gap: 3px; align-items: center; height: 32px; }
.ov-mic i { width: 4px; height: 30%; border-radius: 2px; background: var(--accent); animation: eq 1s ease-in-out infinite alternate; }
.ov-mic i:nth-child(2n) { animation-duration: .7s; } .ov-mic i:nth-child(3n) { animation-duration: 1.3s; } .ov-mic i:nth-child(5n) { animation-duration: .5s; }
@keyframes eq { to { height: 100%; } }

.viz-fg { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; font-family: var(--font-display); }
.viz-fg span { font-size: 22px; color: var(--muted); }
.viz-fg i { flex: 1; height: 2px; align-self: center; background: linear-gradient(90deg, var(--muted), var(--accent)); position: relative; }
.viz-fg i::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--accent); }
.viz-fg b { font-size: 36px; color: var(--cyan); text-shadow: 0 0 24px rgba(0, 167, 255, .7); }
.viz-fg em { font-style: normal; color: var(--muted); font-size: 14px; }

.viz-live { display: grid; gap: 8px; }
.dest { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.dest b { margin-left: auto; font-size: 11px; letter-spacing: .08em; color: var(--accent); background: var(--accent-soft); padding: 4px 7px; border-radius: 6px; }
.dest.v b { color: #ff9bd0; background: rgba(255, 105, 180, .12); }
.dest:nth-child(2) .dot { animation-delay: .4s; } .dest:nth-child(3) .dot { animation-delay: .8s; } .dest:nth-child(4) .dot { animation-delay: 1.2s; }

/* ---- reveal ตอนเลื่อน ---- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-4px); transition-delay: 0s; }

/* ---- showcase ---- */
.row .shot { box-shadow: 0 40px 100px -40px rgba(0, 167, 255, .45); }
.row .shot img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.row .shot:hover img { transform: scale(1.03); }
.row-text h2 { background: linear-gradient(180deg, #fff 30%, #a9c7dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gallery .shot { overflow: hidden; }
.gallery .shot img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.gallery .shot:hover img { transform: scale(1.05); }

/* ---- download card ---- */
.dl-card { position: relative; background: linear-gradient(180deg, rgba(23, 33, 44, .9), rgba(15, 21, 28, .9)); box-shadow: 0 40px 120px -50px rgba(0, 167, 255, .6); }
.dl-card::before { animation-duration: 6s; }
.dl-card > img { filter: drop-shadow(0 0 24px rgba(0, 167, 255, .6)); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.dl-card:hover > img { transform: rotate(360deg); }

@media (max-width: 1040px) {
  .card.wide { grid-template-columns: 1fr; }
  .f-a, .f-c { left: -8px; } .f-b, .f-d { right: -8px; }
  .ring { width: 640px; height: 640px; margin-left: -320px; }
}
@media (max-width: 720px) {
  .card.wide, .card.half { grid-column: auto; }
  .float { padding: 8px 10px; gap: 6px; } .float b { font-size: 14px; } .f-a b { font-size: 20px; } .float .k { font-size: 9px; }
  .f-a { left: 6px; top: 6px; } .f-b { right: 6px; top: auto; bottom: 6px; } .f-c, .f-d { display: none; }
  .ring { width: 460px; height: 460px; margin-left: -230px; top: 40px; }
  .track span { padding: 14px 18px; } .track span::after { margin-left: 36px; }
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora, .floor, .ring circle, .track, h1 em, .btn-lg, .float, .scan, .frame::before, .dl-card::before,
  .ov-chat span, .ov-mic i, .dot { animation: none !important; }
  .ov-chat span { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
  .stage { transform: none !important; }
}

/* แก้หลังดูของจริง */
.strip b .count { font: inherit; color: inherit; }
.ring { opacity: .36; }
.lede { text-shadow: 0 1px 12px rgba(11, 15, 20, .9); }
.gallery .shot img.pos-bottom { object-position: bottom center; }

/* ---- PS-WRAP Link (เร็วๆ นี้) ---- */
.nav-link-soon sup { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ff9bd0; margin-left: 2px; }
.link { padding-top: 24px; }
.link-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
  padding: 56px; border-radius: 28px; border: 1px solid rgba(255, 105, 180, .22);
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(255, 79, 163, .20), transparent 65%),
    radial-gradient(520px 420px at 0% 100%, rgba(109, 92, 255, .25), transparent 65%),
    linear-gradient(160deg, #141b26, #0d1219);
  box-shadow: 0 50px 140px -60px rgba(255, 79, 163, .45);
}
.link-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 40px 40px,
              linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: radial-gradient(circle at 75% 50%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 75% 50%, #000, transparent 70%);
}
.soon {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  color: #ffd1e8; background: rgba(255, 79, 163, .14); border: 1px solid rgba(255, 105, 180, .35); letter-spacing: .14em;
}
.soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff4fa3; box-shadow: 0 0 10px #ff4fa3; animation: blink 1.4s ease-in-out infinite; }
.link-name {
  font-size: clamp(40px, 5.4vw, 64px); line-height: 1.05; font-weight: 780; letter-spacing: -.02em;
  background: linear-gradient(100deg, #fff 0%, #ffb3da 35%, #ff4fa3 55%, var(--violet) 80%, var(--cyan) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out infinite;
}
.link-lede { color: #c3cfdb; font-size: 18px; margin: 18px 0 0; max-width: 52ch; }
.link-modes { display: grid; gap: 14px; margin: 28px 0 30px; }
.mode { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); }
.mode .ic { margin: 0; background: rgba(255, 79, 163, .14); }
.mode .ic svg { stroke: #ff7ab8; }
.mode h3 { font-size: 17px; margin-bottom: 4px; }
.mode p { margin: 0; color: var(--muted); font-size: 15px; }

.link-viz { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 320px; }
.node {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; white-space: nowrap;
  background: rgba(13, 19, 26, .78); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9);
}
.node b { font-size: 15px; }
.node span:not(.av) { color: var(--muted); font-size: 12.5px; }
.host { flex-direction: column; padding: 20px 18px; border-color: rgba(0, 167, 255, .45); box-shadow: 0 0 40px -6px rgba(0, 167, 255, .5); }
.host img { filter: drop-shadow(0 0 14px rgba(0, 167, 255, .8)); }
.beams { width: 100%; height: 300px; overflow: visible; }
.beams path { fill: none; stroke: rgba(255, 255, 255, .10); stroke-width: 2; vector-effect: non-scaling-stroke; }
.beams .flow { stroke: #5ad1ff; stroke-width: 3; stroke-dasharray: 6 26; stroke-linecap: round; animation: flow 1.1s linear infinite; filter: drop-shadow(0 0 4px #00a7ff); }
.beams .flow.back { stroke: #ffc861; filter: drop-shadow(0 0 4px #ffb020); }
@keyframes flow { to { stroke-dashoffset: -32; } }
.friends { display: grid; gap: 54px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--font); color: #0b0f14; background: var(--c); }
.tag { margin-left: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(90, 209, 255, .12); color: var(--cyan) !important; font-weight: 600; }
.tag.pad { background: rgba(255, 200, 97, .14); color: #ffc861 !important; }
.has-pad { border-color: rgba(255, 200, 97, .45); box-shadow: 0 0 30px -6px rgba(255, 176, 32, .5); animation: bob 5s ease-in-out infinite; transform: none; }
@keyframes bobflat { 50% { transform: translateY(-6px); } }
.has-pad { animation-name: bobflat; }

@media (max-width: 1040px) {
  .link-card { grid-template-columns: 1fr; padding: 40px 28px; }
}
@media (max-width: 720px) {
  .link-card { padding: 30px 18px; border-radius: 22px; }
  .link-viz { grid-template-columns: 1fr; min-height: 0; gap: 0; justify-items: center; }
  .beams { width: 70%; height: 90px; transform: rotate(90deg) scale(.3, 3.3); display: none; }
  .friends { gap: 10px; width: 100%; margin-top: 16px; }
  .friends::before { content: ""; justify-self: center; width: 2px; height: 28px; margin-bottom: 4px; background: repeating-linear-gradient(#5ad1ff 0 6px, transparent 6px 14px); animation: flowv 1s linear infinite; }
  @keyframes flowv { to { background-position: 0 14px; } }
  .node.friend { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .beams .flow, .soon::before, .link-name, .has-pad, .friends::before { animation: none !important; }
}

/* hero = ภาพ status bar: หลบนาฬิกา/overlay จอยด้านขวา และไม่ทับ status bar */
.f-b { top: 1.5%; }
.f-d { bottom: 3%; }
@media (max-width: 720px) { .f-b { top: auto; bottom: 6px; } }

/* แชทจำลองทับกล่อง LIVE CHAT ในภาพ hero (พิกัดเทียบภาพ 1600×900) */
.screen { position: relative; container-type: inline-size; }
.fakechat {
  position: absolute; left: 88.4%; top: 37.4%; width: 10.7%; height: 23.8%;
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(14, 20, 27, .94); border: 1px solid rgba(255, 255, 255, .08); border-radius: .55cqw;
  padding: .45cqw .5cqw; font-size: .7cqw; line-height: 1.35; color: #dfe7ee;
}
.fc-head { display: flex; align-items: center; gap: .35cqw; font-weight: 700; letter-spacing: .08em; font-size: .5cqw; color: #aab6c2; margin-bottom: .3cqw; }
.fc-head i { width: .45cqw; height: .45cqw; border-radius: 50%; background: var(--red); box-shadow: 0 0 .5cqw var(--red); animation: blink 1.4s ease-in-out infinite; }
.fc-list { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .22cqw; overflow: hidden; }
.fc-msg { display: flex; gap: .3cqw; align-items: flex-start; animation: fcin .35s cubic-bezier(.2, .7, .2, 1); word-break: break-word; }
.fc-msg .src { flex: none; width: .45cqw; height: .45cqw; margin-top: .3cqw; border-radius: 50%; background: var(--s); }
.fc-msg b { color: var(--c); font-weight: 700; }
@keyframes fcin { from { opacity: 0; transform: translateY(.6cqw); } }
@media (prefers-reduced-motion: reduce) { .fc-msg, .fc-head i { animation: none; } }

/* ชิป REC สลับ 4K ↔ 9:16 */
.rec-swap { display: grid; }
.rs { grid-area: 1 / 1; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease; }
.rs.on { opacity: 1; transform: none; transition-delay: .3s; }

/* ---- Light: สีไฟจอยเรืองรอบภาพ ---- */
.light-card { --lc: #00a7ff; }
.lc-dots { display: flex; gap: 10px; margin-top: 18px; }
.lc-dots button {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; padding: 0;
  background: var(--lc); border: 2px solid rgba(255, 255, 255, .15);
  box-shadow: 0 0 12px -2px var(--lc); transition: transform .15s ease, border-color .15s ease;
}
.lc-dots button:hover { transform: scale(1.12); }
.lc-dots button[aria-pressed="true"] { border-color: #fff; transform: scale(1.12); }
.viz-light { display: grid; gap: 14px; justify-items: center; }
.lc-screen {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; padding: 6px; position: relative;
  background: #05080b; border: 1px solid var(--line);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lc) 45%, transparent), 0 0 34px -4px var(--lc);
  transition: box-shadow .6s ease;
}
.lc-scene {
  height: 100%; border-radius: 6px;
  background:
    radial-gradient(circle at 70% 40%, rgba(255, 170, 90, .35), transparent 45%),
    radial-gradient(circle at 25% 70%, rgba(90, 140, 255, .25), transparent 50%),
    linear-gradient(160deg, #1d2733, #0b1016);
  box-shadow: inset 0 0 28px -6px var(--lc), inset 0 0 0 2px color-mix(in srgb, var(--lc) 55%, transparent);
  transition: box-shadow .6s ease;
}
.lc-flash .lc-screen { animation: lcflash .5s ease; }
@keyframes lcflash { 30% { box-shadow: 0 0 0 2px var(--lc), 0 0 70px 6px var(--lc); } }
.lc-pad { width: 62%; max-width: 220px; overflow: visible; }
.lc-pad .body { fill: #e9edf2; stroke: #c9d1da; stroke-width: 1.5; }
.lc-pad .tp { fill: #1a2129; }
.lc-pad .stick { fill: #2a333d; stroke: #11161c; stroke-width: 3; }
.lc-pad .bar { fill: var(--lc); filter: drop-shadow(0 0 5px var(--lc)); transition: fill .6s ease; }
@media (prefers-reduced-motion: reduce) { .lc-flash .lc-screen { animation: none; } }

/* ---- hero: Light (สีไฟจอยเรืองรอบภาพ + ไฟบนรูปจอยใน overlay) ---- */
.stage { --lc: #00a7ff; }
.lightglow {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 60px -10px var(--lc), inset 0 0 0 2px color-mix(in srgb, var(--lc) 60%, transparent);
  transition: box-shadow .8s ease;
}
.stage.lc-flash .lightglow { animation: heroflash .7s ease; }
@keyframes heroflash { 25% { box-shadow: inset 0 0 120px 0 var(--lc), inset 0 0 0 4px var(--lc); } }
/* ไฟสองข้าง touchpad ของรูปจอย (พิกัดเทียบภาพ 1600×900) */
.lb { position: absolute; top: 70.2%; height: 3.1%; width: .32%; border-radius: 99px; background: var(--lc); box-shadow: 0 0 .5cqw .1cqw var(--lc); transition: background .8s ease, box-shadow .8s ease; }
.lb-l { left: 91.8%; }
.lb-r { left: 95.25%; }
/* เงารอบกรอบใหญ่เปลี่ยนตามสีไฟด้วย */
.glow { box-shadow: 0 60px 160px -40px color-mix(in srgb, var(--lc) 70%, transparent), 0 0 0 1px color-mix(in srgb, var(--lc) 25%, transparent), 0 0 80px -10px color-mix(in srgb, var(--lc) 45%, transparent); transition: box-shadow .8s ease; }
@media (prefers-reduced-motion: reduce) { .stage.lc-flash .lightglow { animation: none; } }

/* Light บน hero: เบาลง (ลูกพี่: "เอาสีเบาๆ พอสวย") */
.lightglow { box-shadow: inset 0 0 36px -14px color-mix(in srgb, var(--lc) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--lc) 28%, transparent); }
@keyframes heroflash { 30% { box-shadow: inset 0 0 50px -12px var(--lc), inset 0 0 0 1px color-mix(in srgb, var(--lc) 55%, transparent); } }
.glow { box-shadow: 0 60px 160px -40px color-mix(in srgb, var(--lc) 38%, rgba(0, 167, 255, .25)), 0 0 0 1px color-mix(in srgb, var(--lc) 14%, transparent), 0 0 70px -20px color-mix(in srgb, var(--lc) 25%, transparent); }
.lb { box-shadow: 0 0 .35cqw 0 var(--lc); opacity: .9; }

/* ---- Facecam demo: เอฟเฟกต์จริงของแอป (res/fx/*.svg) บนหน้าการ์ตูน ---- */
.viz-cam { margin-top: 18px; position: relative; }
.cam-clip {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0b0f14;
  clip-path: inset(0 round 12px); transition: clip-path .6s cubic-bezier(.2, .7, .2, 1);
}
.viz-cam.circle .cam-clip { clip-path: circle(40% at 50% 52%); }
.cam-svg { display: block; width: 100%; height: auto; }
.cam-room { transition: opacity .6s ease, filter .6s ease; }
.viz-cam.blur .cam-room { filter: url(#camblur); }
.cam-key { opacity: 0; transition: opacity .6s ease; }
.viz-cam.keyed .cam-key { opacity: 1; }
.cam-head { transform-box: view-box; transform-origin: 120px 170px; animation: headbob 5.5s ease-in-out infinite; }
@keyframes headbob {
  0%, 100% { transform: rotate(0) translate(0, 0); }
  25% { transform: rotate(-5deg) translate(-4px, 1px); }
  60% { transform: rotate(4deg) translate(5px, -1px); }
}
.fx { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.85); transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.viz-cam[data-fx~="sunglasses"] .fx-sunglasses,
.viz-cam[data-fx~="crown"] .fx-crown,
.viz-cam[data-fx~="mustache"] .fx-mustache,
.viz-cam[data-fx~="ninja"] .fx-ninja,
.viz-cam[data-fx~="samurai"] .fx-samurai,
.viz-cam[data-fx~="kabuto"] .fx-kabuto { opacity: 1; transform: none; }
.cam-tag {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #e8edf2;
  background: rgba(8, 12, 17, .72); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(6px);
}
.cam-tag i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
@media (prefers-reduced-motion: reduce) { .cam-head { animation: none; } .fx, .cam-clip, .cam-room, .cam-key { transition: none; } }

/* ---- ทำให้นุ่มขึ้น/ช้าลง (ลูกพี่: "smooth กว่านี้ ไวไป") ---- */
.stage { transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.lightglow, .glow, .lb { transition-duration: 2s; transition-timing-function: ease-in-out; }
.stage.lc-flash .lightglow { animation: heroflash 1.8s ease-in-out; }
.float { animation-duration: 9s; }
.scan { animation-duration: 9s; }
.fc-msg { animation: fcin .8s cubic-bezier(.16, 1, .3, 1); }
.rs { transition: opacity .7s ease-in-out, transform .7s ease-in-out; }
.rs.on { transition-delay: .7s; }
.lc-screen, .lc-scene, .lc-pad .bar { transition-duration: 1.4s; }
.lc-flash .lc-screen { animation: lcflash 1.2s ease-in-out; }
.fx { transition: opacity .7s ease, transform .7s cubic-bezier(.16, 1, .3, 1); }
.cam-room, .cam-key, .cam-clip { transition-duration: 1s; }
.cam-head { animation-duration: 8s; }
.dot.red { animation-duration: 2.2s; }
