/* =====================================================================
   KWAY Bridge OS — ชั้นดีไซน์ "สะพานเดินเรือยานอวกาศ"
   อวกาศเคลื่อนไหว · พื้นกริดโฮโลแกรม · กรอบ HUD มุมเล็ง · แสงตามเคอร์เซอร์ · มาตรพลังงาน · บูตระบบ
   วางทับ kway.css / app.css (ไม่แก้ของเดิม) — เคารพ prefers-reduced-motion
   ===================================================================== */
:root {
  --hud: rgba(var(--neon-rgb), .75);
  --hud-dim: rgba(143, 200, 255, .28);
  --hud-len: 14px;
  --ember: #FFB86B;
  /* กรอบมุมเล็ง HUD (ไม่ใช้ pseudo element → ใช้ได้กับทุก panel) */
  --brackets:
    linear-gradient(var(--hud), var(--hud)) top left / var(--hud-len) 1px no-repeat,
    linear-gradient(var(--hud), var(--hud)) top left / 1px var(--hud-len) no-repeat,
    linear-gradient(var(--hud), var(--hud)) top right / var(--hud-len) 1px no-repeat,
    linear-gradient(var(--hud), var(--hud)) top right / 1px var(--hud-len) no-repeat,
    linear-gradient(var(--hud-dim), var(--hud-dim)) bottom left / var(--hud-len) 1px no-repeat,
    linear-gradient(var(--hud-dim), var(--hud-dim)) bottom left / 1px var(--hud-len) no-repeat,
    linear-gradient(var(--hud-dim), var(--hud-dim)) bottom right / var(--hud-len) 1px no-repeat,
    linear-gradient(var(--hud-dim), var(--hud-dim)) bottom right / 1px var(--hud-len) no-repeat;
}

/* ---------- ห้วงอวกาศ: ดาว 3 ชั้น (parallax) + เนบิวลา + พื้นกริดโฮโลแกรม + เส้นสแกน ---------- */
.space { position: fixed; inset: 0; z-index: 0 !important; pointer-events: none; overflow: hidden; }
.space i { position: absolute; display: block; }
.space .nebula { inset: -10%; background:
  radial-gradient(40% 30% at 78% 18%, rgba(143, 110, 255, .16), transparent 70%),
  radial-gradient(35% 28% at 12% 70%, rgba(40, 190, 255, .12), transparent 70%),
  radial-gradient(30% 25% at 55% 55%, rgba(var(--neon-rgb), .06), transparent 70%);
  animation: nebula 60s ease-in-out infinite alternate; }
.space .stars { inset: -50% -50%; width: 200%; height: 200%; background-repeat: repeat; will-change: transform; }
.space .s1 { background-image: radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.9), transparent 60%), radial-gradient(1px 1px at 150px 90px, rgba(200,230,255,.8), transparent 60%), radial-gradient(1px 1px at 90px 180px, rgba(255,255,255,.7), transparent 60%), radial-gradient(1.2px 1.2px at 230px 240px, rgba(170,220,255,.9), transparent 60%); background-size: 260px 260px; opacity: .55; animation: drift 140s linear infinite; }
.space .s2 { background-image: radial-gradient(1.4px 1.4px at 60px 120px, rgba(255,255,255,.95), transparent 60%), radial-gradient(1px 1px at 310px 40px, rgba(150,210,255,.9), transparent 60%), radial-gradient(1.6px 1.6px at 200px 330px, rgba(255,240,220,.8), transparent 60%); background-size: 380px 380px; opacity: .45; animation: drift 90s linear infinite; }
.space .s3 { background-image: radial-gradient(2px 2px at 120px 60px, rgba(var(--neon-rgb),.9), transparent 60%), radial-gradient(1.8px 1.8px at 480px 300px, rgba(200,210,255,.8), transparent 60%); background-size: 560px 560px; opacity: .5; animation: drift 55s linear infinite, twinkle 4s ease-in-out infinite; }
.space .floor { left: -30%; right: -30%; bottom: -8%; height: 46%; transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(var(--neon-rgb), .22) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--neon-rgb), .18) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.5) 35%, transparent 80%); -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.5) 35%, transparent 80%);
  animation: floor 6s linear infinite; opacity: .55; }
.space .horizon { left: 10%; right: 10%; bottom: 29%; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--neon-rgb), .45), transparent); box-shadow: 0 0 30px 6px rgba(var(--neon-rgb), .08); opacity: .35; }
.space .sweep { left: 0; right: 0; top: -20%; height: 20%; background: linear-gradient(180deg, transparent, rgba(var(--neon-rgb), .045), transparent); animation: sweep 9s ease-in-out infinite; }
@keyframes drift { to { transform: translate3d(-25%, -12%, 0); } }
@keyframes twinkle { 50% { opacity: .25; } }
@keyframes floor { to { background-position: 0 64px, 0 0; } }
@keyframes sweep { 0% { transform: translateY(0); } 100% { transform: translateY(620%); } }
@keyframes nebula { to { transform: translate3d(2%, -2%, 0) scale(1.06); } }

/* แสงบนกระจกตามเคอร์เซอร์ */
.cursor-light { position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle, rgba(120, 200, 255, .09), rgba(var(--neon-rgb), .03) 40%, transparent 70%); mix-blend-mode: screen; transition: opacity .4s; will-change: transform; }

/* ---------- แผงทั้งหมดได้กรอบมุมเล็ง ---------- */
.card, .tool, .modal, .side, .gallery, .plan-card, .sb {
  background-image: var(--brackets);
}
.card { background-color: var(--surface); }
.modal { background-color: rgba(var(--n-14-30-66), .86); }
.tool { background-color: rgba(var(--n-14-30-66), .62); }
.plan-card { background-color: rgba(var(--n-10-22-52), .62); }
.side { background-color: rgba(var(--n-18-36-80), .55); }

/* ---------- แถบโทรมาตร (Telemetry) ที่หัวจอ ---------- */
.tele { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tele .chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(var(--n-8-18-44), .45); white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.tele .chip b { color: var(--text); font-weight: 500; }
.tele .chip .led { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: led 2.4s ease-in-out infinite; }
.tele .cells { display: inline-flex; gap: 2px; }
.tele .cells i { width: 4px; height: 10px; border-radius: 1px; background: rgba(255,255,255,.1); }
.tele .cells i.on { background: var(--neon); box-shadow: 0 0 6px var(--neon); }
.tele .cells.low i.on { background: var(--ember); box-shadow: 0 0 6px var(--ember); }
.tele .sig { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.tele .sig i { width: 2px; background: var(--neon); opacity: .9; } .tele .sig i:nth-child(1) { height: 30%; } .tele .sig i:nth-child(2) { height: 55%; } .tele .sig i:nth-child(3) { height: 80%; } .tele .sig i:nth-child(4) { height: 100%; }
.tele .sig.weak i:nth-child(n+3) { opacity: .2; }
.sys-status { display: none; }
@media (max-width: 1100px) { .tele .chip.opt { display: none; } }
@media (max-width: 640px) { .tele { display: none; } }

/* ---------- แถบข้าง: ดาดฟ้านำทาง ---------- */
@media (min-width: 821px) { .side { position: relative; } }
.side::after { content: ''; position: absolute; left: 0; top: 70px; bottom: 70px; width: 1px; background: linear-gradient(180deg, transparent, rgba(var(--neon-rgb), .5), transparent); box-shadow: 0 0 10px rgba(var(--neon-rgb), .35); pointer-events: none; }
.nav-item { font-family: var(--font); }
.nav-item::after { content: ''; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.12); transition: .2s; }
.nav-item:hover::after { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.nav-item.refer .pill { margin-left: 4px; padding: 1px 7px; font-size: 10.5px; }
.nav-item.refer::after { background: var(--ember); box-shadow: 0 0 8px var(--ember); animation: led 1.8s ease-in-out infinite; }
.side-label { display: flex; align-items: center; gap: 8px; }
.side-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

/* เซลล์พลังงาน (เครดิต) */
.credit-box { clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.energy-cells { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; height: 8px; }
.energy-cells i { border-radius: 1px; background: rgba(255,255,255,.07); transition: background .4s, box-shadow .4s; }
.energy-cells i.on { background: linear-gradient(180deg, #9FF3FF, var(--neon)); box-shadow: 0 0 6px rgba(var(--neon-rgb), .7); }
.energy-cells.low i.on { background: linear-gradient(180deg, #FFD9A8, var(--ember)); box-shadow: 0 0 6px rgba(255, 184, 107, .7); }
.credit-box .meter { display: none; }

/* ---------- หน้าว่าง: แกนปฏิกรณ์ + เรดาร์ ---------- */
.emblem::before { content: ''; position: absolute; inset: -46px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 300deg, rgba(var(--neon-rgb), .28) 350deg, rgba(var(--neon-rgb), .6) 360deg);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%, #000 70%, transparent 71%); mask: radial-gradient(circle, transparent 58%, #000 59%, #000 70%, transparent 71%); animation: rot 5s linear infinite; }
.emblem::after { content: ''; position: absolute; inset: -46px; border-radius: 50%; border: 1px solid rgba(143, 200, 255, .1);
  background: radial-gradient(circle at 50% 0, var(--neon) 0 2px, transparent 3px), radial-gradient(circle at 100% 50%, #B7A8FF 0 1.5px, transparent 2.5px); animation: rot 14s linear infinite reverse; }
.empty .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--neon); }
.empty .eyebrow::before, .empty .eyebrow::after { content: ''; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--neon)); }
.empty .eyebrow::after { transform: scaleX(-1); }
.empty h1 { text-shadow: 0 0 40px rgba(var(--neon-rgb), .12); }
.tpl { clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); transition: transform .25s, background-color .25s; }
.tpl:hover { background-color: rgba(var(--n-30-60-120), .6); transform: translateY(-3px); }
.tpl .ti { clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); border-radius: 0; }
.tpl b { font-family: var(--font-display); letter-spacing: .01em; }
.templates { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---------- คอนโซลสั่งการ ---------- */
.composer { border-radius: 16px; background-color: rgba(var(--n-12-28-64), .78); background-image: var(--brackets); --hud-len: 18px; }
.composer::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 60%, rgba(var(--neon-rgb), .9) 80%, #B7A8FF 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ang 3.2s linear infinite; }
.composer:focus-within::after { opacity: 1; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ang { to { --ang: 360deg; } }
.modes button { position: relative; padding-left: 22px; border-radius: 6px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); font-family: var(--font); }
.modes button::before { content: ''; position: absolute; left: 9px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: rgba(255,255,255,.18); }
.modes button.on::before { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.modes button svg.i { display: none; }
/* ปุ่มส่ง = แกนพลังงาน */
.send { position: relative; border-radius: 50% !important; overflow: visible; }
.send::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(var(--neon-rgb), .9), transparent 40%, rgba(183, 168, 255, .8), transparent 75%); -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%); animation: rot 2.6s linear infinite; opacity: .9; }
.send:disabled::before { opacity: .15; animation-duration: 12s; }
.foot-note { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; }

/* ---------- โมดูลปฏิบัติการ (การ์ดเครื่องมือ) ---------- */
.tool { border-radius: 10px; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.tool.running { background-image: var(--brackets), repeating-linear-gradient(115deg, rgba(var(--neon-rgb), .045) 0 12px, transparent 12px 24px); background-size: auto, auto, auto, auto, auto, auto, auto, auto, 200% 100%; animation: stream 1.4s linear infinite; }
@keyframes stream { to { background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right, -48px 0; } }
.tool-head .ic { border-radius: 0; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.tool-head .nm { font-family: var(--font-display); letter-spacing: .02em; }
.tool-head .st { font-family: var(--font-mono); letter-spacing: .03em; }
.asset { border-radius: 8px; }
.srt-link { position: absolute; left: 8px; bottom: 8px; font: 600 10.5px var(--font-mono); letter-spacing: .08em; padding: 3px 8px; border-radius: 4px; background: rgba(5, 12, 30, .8); color: var(--neon); border: 1px solid rgba(var(--neon-rgb), .45); }
.msg-user { border-radius: 14px 14px 2px 14px; background-image: linear-gradient(180deg, rgba(var(--n-70-100-160), .55), rgba(var(--n-40-64-118), .55)); }
.msg-user .atts video, .msg-user .atts .att-audio { width: 110px; height: 72px; border-radius: 8px; object-fit: cover; background: #000; display: grid; place-items: center; color: var(--neon); }
.agent-turn > .av { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 14px rgba(var(--neon-rgb), .6)); } }
.att video { width: 100%; height: 100%; object-fit: cover; }
.att .att-audio { display: grid; place-items: center; width: 100%; height: 100%; color: var(--neon); }
.att.up { display: grid; place-items: center; align-content: center; gap: 2px; }
.att.up small { font: 10px var(--font-mono); color: var(--neon); }

/* ---------- บูตระบบ ---------- */
.boot { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #16306B, #081530 70%); transition: opacity .5s, visibility .5s; cursor: pointer; }
.boot.done { opacity: 0; visibility: hidden; }
.boot-in { width: min(520px, 88vw); font: 12.5px/1.9 var(--font-mono); color: var(--text-2); }
.boot-in .logo-b { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.boot-in .logo-b img { width: 48px; filter: drop-shadow(0 0 18px rgba(var(--neon-rgb), .6)); }
.boot-in .logo-b b { font: 600 22px var(--font-display); letter-spacing: .3em; color: var(--text); }
.boot-in .ln { opacity: 0; transform: translateY(4px); transition: .25s; } .boot-in .ln.show { opacity: 1; transform: none; }
.boot-in .ln em { color: var(--green); font-style: normal; float: right; }
.boot-bar { height: 2px; margin-top: 16px; background: rgba(255,255,255,.08); overflow: hidden; } .boot-bar i { display: block; height: 100%; width: 0; background: var(--neon-grad); box-shadow: 0 0 10px var(--neon); transition: width 1.2s cubic-bezier(.3,.7,.2,1); }

/* ---------- ฟีเจอร์ใหม่: Brand Kit / เสียงของฉัน / ชวนเพื่อน ---------- */
.brand-grid { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }
.brand-assets { display: grid; gap: 12px; align-content: start; }
.drop { aspect-ratio: 1; display: grid; place-items: center; border: 1px dashed rgba(var(--neon-rgb), .45); border-radius: 12px; cursor: pointer; color: var(--neon); background: rgba(var(--neon-rgb), .04); position: relative; overflow: hidden; font-size: 13px; }
.drop img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.drop.has span { display: none; } .drop:hover { box-shadow: 0 0 18px rgba(var(--neon-rgb), .2); }
.swatches:empty { display: none; }
.swatches { display: flex; height: 26px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); } .swatches i { flex: 1; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.color-chip { position: relative; cursor: pointer; } .color-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.color-chip span { display: inline-grid; place-items: center; min-width: 84px; height: 32px; padding: 0 8px; border-radius: 8px; font: 11px var(--font-mono); color: #fff; text-shadow: 0 1px 2px #000; border: 1px solid rgba(255,255,255,.25); }
.color-chip span.empty { border-style: dashed; color: var(--text-3); text-shadow: none; }
.switch { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text-2); } .switch input { accent-color: var(--neon); width: 16px; height: 16px; }
@media (max-width: 640px) { .brand-grid { grid-template-columns: 1fr; } .brand-assets { grid-template-columns: 1fr 1fr; } .swatches { grid-column: 1 / -1; } }
.read-card { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(var(--n-6-16-42), .5); background-image: var(--brackets); }
.read-card p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.9; color: var(--text); }
.rec-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF5A7A; box-shadow: 0 0 8px #FF5A7A; }
#recBtn.on { border-color: #FF5A7A; } #recBtn.on .rec-dot { animation: led .8s ease-in-out infinite; }
#recPrev, #voicePrev { width: 100%; height: 36px; margin-top: 6px; }
.voice-card { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid rgba(var(--neon-rgb), .35); border-radius: 12px; background: rgba(var(--neon-rgb), .05); margin-bottom: 10px; } .voice-card > div:last-child { flex: 1; }
.vp-wave { display: flex; gap: 3px; align-items: center; height: 36px; } .vp-wave i { width: 3px; border-radius: 2px; background: var(--neon); box-shadow: 0 0 6px var(--neon); animation: vw 1.1s ease-in-out infinite; }
.vp-wave i:nth-child(odd) { animation-delay: -.4s; } .vp-wave i:nth-child(3n) { animation-delay: -.7s; }
@keyframes vw { 0%, 100% { height: 20%; } 50% { height: 100%; } }
.refer-hero { text-align: center; } .refer-hero h2 { margin: 10px 0 6px; }
.gift-orb { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--ember); background: radial-gradient(circle, rgba(255, 184, 107, .2), transparent 70%); border: 1px solid rgba(255, 184, 107, .5); box-shadow: 0 0 30px rgba(255, 184, 107, .25); }
.gift-orb svg.i { width: 30px; height: 30px; }
.ref-link { display: flex; gap: 8px; margin: 18px 0 10px; } .ref-link .input { font-family: var(--font-mono); font-size: 13px; }
.ref-share { display: flex; gap: 8px; justify-content: center; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.ref-stats div { text-align: center; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; background: rgba(var(--n-6-16-42), .45); }
.ref-stats b { display: block; font: 600 22px var(--font-display); color: var(--neon); } .ref-stats span { font-size: 11.5px; color: var(--text-3); }

/* ---------- Landing / หน้าอื่นที่ใช้ร่วม ---------- */
.hud-frame { background-image: var(--brackets); }

@media (prefers-reduced-motion: reduce) {
  .space i, .emblem::before, .emblem::after, .send::before, .composer::after, .tool.running, .agent-turn > .av, .vp-wave i { animation: none !important; }
  .cursor-light, .boot { display: none !important; }
}

/* ---------- คำสั่งด่วน (⌘K) ---------- */
.cmdk-bg { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 14px 14px; background: rgba(var(--n-6-14-38), .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: cmdkIn .18s ease; }
.cmdk { width: min(620px, 100%); padding: 0; overflow: hidden; background-color: rgba(var(--n-14-30-66), .92); background-image: var(--brackets); --hud-len: 20px; box-shadow: var(--shadow), 0 0 0 1px rgba(var(--neon-rgb), .25), 0 0 60px rgba(var(--neon-rgb), .15); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmdk-in .i { color: var(--neon); flex: none; }
.cmdk-in input { flex: 1; background: none; border: 0; outline: none; font-size: 16px; color: var(--text); min-width: 0; }
.cmdk-list { max-height: min(56vh, 460px); overflow: auto; padding: 6px; }
.cmdk-g { font: 600 10.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 4px; }
.cmdk-it { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; color: var(--text-2); font-size: 14.5px; }
.cmdk-it .i { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.cmdk-it.on { background: var(--neon-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--neon); }
.cmdk-it.on .i { color: var(--neon); }
.cmdk-empty { padding: 18px 12px; color: var(--text-3); font-size: 14px; }
.cmdk-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--text-3); }
kbd, .kbd-hint { font: 600 10.5px var(--font-mono); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(var(--n-8-18-44), .5); color: var(--text-3); margin: 0 2px; }
.nav-item .kbd-hint { margin-left: auto; }
@keyframes cmdkIn { from { opacity: 0; } }
.cmdk-bg[hidden] { display: none; }

/* ---------- Prompt Magic ---------- */
.magic-btn { color: var(--neon-2); }
.magic-btn:hover { color: var(--neon); box-shadow: 0 0 14px rgba(var(--neon-rgb), .35); }
.magic-btn.busy { animation: magicPulse .8s ease-in-out infinite; color: var(--neon); }
@keyframes magicPulse { 50% { box-shadow: 0 0 0 1px rgba(var(--neon-rgb), .6), 0 0 22px rgba(var(--neon-rgb), .5); transform: rotate(-8deg) scale(1.06); } }
#input.magic-run { background-image: linear-gradient(90deg, transparent, rgba(var(--neon-rgb), .12), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: magicScan 1s linear infinite; }
@keyframes magicScan { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- แชร์ ---------- */
.share-prev { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; max-height: 220px; display: grid; place-items: center; background: rgba(var(--n-8-18-44), .6); }
.share-prev img, .share-prev video { width: 100%; max-height: 220px; object-fit: contain; display: block; }
.share-prev .sp-ic { font-size: 54px; padding: 24px; color: var(--neon); }
.gx-toggle { display: flex; gap: 12px; align-items: center; margin: 14px 0; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--n-8-18-44), .35); }
.gx-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.gx-toggle .sw { width: 40px; height: 22px; border-radius: 99px; background: rgba(var(--n-44-68-120), .8); border: 1px solid var(--line-2); position: relative; flex: none; transition: .2s; }
.gx-toggle .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: .2s; }
.gx-toggle input:checked + .sw { background: var(--neon-soft); border-color: rgba(var(--neon-rgb), .6); box-shadow: 0 0 12px rgba(var(--neon-rgb), .3); }
.gx-toggle input:checked + .sw::after { left: 20px; background: var(--neon); }
.gx-toggle input:focus-visible + .sw { outline: 2px solid var(--neon); outline-offset: 2px; }

/* ---------- การ์ดโฮโลแกรม ---------- */
.holo { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease; }
.gal-grid .g.holo::after, .lib-grid .g.holo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .18), transparent 50%), linear-gradient(115deg, transparent 35%, rgba(var(--neon-rgb), .16) 50%, transparent 65%); mix-blend-mode: screen; opacity: 0; transition: opacity .2s; }
.gal-grid .g.holo:hover::after, .lib-grid .g.holo:hover::after { opacity: 1; }
@media (max-width: 820px) { .kw-prefs .kw-switch button { min-width: 26px; padding: 4px 5px; } }

/* แถบซ้ายบนจอเตี้ย (โน้ตบุ๊ก/ซูม 125%): รายการงานต้องเห็นเสมอ + เลื่อนทั้งแถบได้ */
@media (min-width: 821px) {
  .side { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
  .chat-list { min-height: 132px; flex: 1 0 132px; }
}
@media (min-width: 821px) and (max-height: 900px) {
  .side { padding: 12px 10px; gap: 6px; }
  .side-top { padding-bottom: 4px; }
  .new-task { padding: 8px 14px; }
  .nav-item, .chat-item { padding: 6px 10px; }
  .side-label { padding-top: 6px; }
  .credit-box { padding: 10px 12px; gap: 6px; }
  .side-bottom { gap: 4px; }
  .help-link { padding-top: 4px; padding-bottom: 4px; }
}

/* ===================== การขาย: ปุ่มเติมเครดิต · แบนเนอร์โปร · เตือนเครดิต · แพ็ก ===================== */
.topup-cta { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; border: 0; cursor: pointer;
  font: 600 13px var(--font); color: #2a1a00; background: linear-gradient(180deg, #FFE08A, #FFB547 60%, #F59E0B); box-shadow: 0 0 0 1px rgba(255, 213, 138, .6), 0 6px 18px rgba(245, 158, 11, .35), inset 0 1px 0 rgba(255,255,255,.6); white-space: nowrap; }
.topup-cta .i { width: 16px; height: 16px; stroke: #2a1a00; }
.topup-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.topup-cta em { position: absolute; top: -8px; right: -8px; font: 700 10px var(--font-mono); font-style: normal; padding: 2px 6px; border-radius: 99px; background: #FF3D6B; color: #fff; box-shadow: 0 0 10px rgba(255, 61, 107, .6); animation: badgePulse 1.6s ease-in-out infinite; }
@keyframes badgePulse { 50% { transform: scale(1.12); } }

.promo-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 6px; padding: 8px 10px 8px 14px; border-radius: 12px; font-size: 13.5px;
  background: linear-gradient(90deg, rgba(255, 181, 71, .2), rgba(255, 61, 107, .16) 60%, rgba(var(--neon-rgb), .12)); border: 1px solid rgba(255, 181, 71, .45); box-shadow: 0 0 24px rgba(255, 181, 71, .12); }
.promo-bar .pb-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-bar .pb-desc { color: var(--text-2); }
.promo-bar .pb-cd { font: 600 12.5px var(--font-mono); color: #FFB547; white-space: nowrap; }
html[data-theme="light"] .promo-bar .pb-cd { color: #C2410C; }
.promo-bar .pb-x { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 14px; padding: 4px; }
.low-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 840px; margin: 0 auto 8px; padding: 8px 10px 8px 14px; border-radius: 12px; font-size: 13.5px;
  background: rgba(255, 107, 134, .1); border: 1px solid rgba(255, 107, 134, .4); }
.low-bar b { color: var(--red); }

.offer-modal { text-align: center; width: min(560px, 100%); }
.om-burst { width: 120px; height: 120px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 181, 71, .35), transparent 70%); position: relative; }
.om-burst::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed rgba(255, 181, 71, .6); animation: rot 14s linear infinite; }
.om-burst span { font: 700 34px var(--font-display); color: #FFB547; text-shadow: 0 0 18px rgba(255, 181, 71, .6); }
@keyframes rot { to { transform: rotate(360deg); } }
.om-cd { font: 600 15px var(--font-mono); color: #FFB547; margin: 6px 0 14px; letter-spacing: .04em; }
.om-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; text-align: left; }

.pk-grid { display: block; }
.pk-promo { padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; background: linear-gradient(90deg, rgba(255, 181, 71, .18), rgba(255, 61, 107, .12)); border: 1px solid rgba(255, 181, 71, .45); }
.pk-promo.first { background: linear-gradient(90deg, rgba(92, 242, 184, .14), rgba(var(--neon-rgb), .1)); border-color: rgba(92, 242, 184, .4); }
.pk-promo span { color: var(--text-2); } .pk-promo .pk-cd { font-family: var(--font-mono); color: #FFB547; margin-left: 6px; }
.pk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pk { position: relative; padding: 16px 14px 12px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pk.best { border-color: rgba(var(--neon-rgb), .55); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--neon-rgb), .35), 0 0 30px rgba(var(--neon-rgb), .15); }
.pk-tag { position: absolute; top: -10px; left: 12px; font: 700 10.5px var(--font); padding: 2px 9px; border-radius: 99px; background: var(--neon-grad); color: #04121f; letter-spacing: .02em; }
.pk:not(.best) .pk-tag { background: var(--amber); color: #3a2600; }
.pk-cr b { font: 600 26px var(--font-display); } .pk-cr small { color: var(--text-3); }
.pk-base s { color: var(--text-3); } .pk-bonus { color: var(--green); font-weight: 600; margin-left: 4px; }
.pk-can { list-style: none; padding: 0; margin: 2px 0 4px; color: var(--text-2); display: grid; gap: 1px; }
.pk-can li::before { content: '▸ '; color: var(--neon); }
.pk-buy { width: 100%; justify-content: center; }
.pk-buy s { opacity: .6; margin-right: 6px; font-weight: 400; }
.pk-per { text-align: center; color: var(--text-3); }
@media (max-width: 820px) {
  .topup-cta span { display: none; } .topup-cta { padding: 0 10px; }
  .promo-bar { margin: 0 8px 6px; font-size: 12.5px; } .promo-bar .pb-desc { display: none; }
  .low-bar { margin: 0 0 6px; font-size: 12.5px; }
}

/* ===================== Money Missions ===================== */
.nav-item.nav-money { color: var(--text); background: linear-gradient(90deg, rgba(255, 181, 71, .16), rgba(var(--neon-rgb), .06)); border-color: rgba(255, 181, 71, .35); font-weight: 600; }
.nav-item.nav-money:hover { background: linear-gradient(90deg, rgba(255, 181, 71, .26), rgba(var(--neon-rgb), .1)); }
.nav-money .nm-ic { width: 18px; text-align: center; }
.mm-banner { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 860px; margin: 0 auto 14px; padding: 14px 16px; text-align: left; cursor: pointer; color: var(--text);
  border-color: rgba(255, 181, 71, .45); background-image: linear-gradient(90deg, rgba(255, 181, 71, .14), rgba(var(--neon-rgb), .06)); }
.mm-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 26px rgba(255, 181, 71, .2); }
.mm-banner > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.mm-banner .mm-go { font-size: 20px; color: #FFB547; }
.mm-ic { font-size: 26px; line-height: 1; } .mm-ic.big { font-size: 46px; }
.mm .mm-head { margin-bottom: 16px; } .mm .mm-head h2 { margin: 6px 0; }
.mm-goals { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mm-goals button { border: 1px solid var(--line-2); background: rgba(var(--n-8-18-44), .45); color: var(--text-2); padding: 5px 12px; border-radius: 99px; font-size: 13px; cursor: pointer; }
.mm-goals button.on { color: var(--neon); border-color: rgba(var(--neon-rgb), .55); background: var(--neon-soft); }
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mm-card { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; cursor: pointer; color: var(--text); }
.mm-card:hover { border-color: rgba(255, 181, 71, .5); transform: translateY(-2px); }
.mm-card b { font-size: 15px; line-height: 1.35; }
.mm-meta { display: grid; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--text-3); }
.mm-prog { height: 4px; border-radius: 4px; background: rgba(var(--n-44-68-120), .7); overflow: hidden; }
.mm-prog i { display: block; height: 100%; background: linear-gradient(90deg, #FFB547, var(--neon)); }
.mm-done { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(92, 242, 184, .18); color: var(--green); }
.mm-done.prog { background: rgba(255, 181, 71, .18); color: #FFB547; }
.mm-note { margin-top: 14px; }
.mm-back { margin-bottom: 10px; }
.mm-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; } .mm-hero h2 { margin-bottom: 4px; } .mm-hero p { margin: 0; }
.mm-money { padding: 14px 16px; border-color: rgba(255, 181, 71, .45); margin-bottom: 12px; } .mm-money p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.mm-need { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; background: rgba(255, 107, 134, .1); border: 1px solid rgba(255, 107, 134, .4); font-size: 14px; }
.mm-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.mm-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--n-8-18-44), .4); }
.mm-steps li.done { border-color: rgba(92, 242, 184, .35); }
.mm-n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--font-display); border: 1px solid rgba(var(--neon-rgb), .5); color: var(--neon); }
.mm-steps li.done .mm-n { background: var(--green); color: #04121f; border-color: transparent; }
.mm-s { flex: 1; display: grid; gap: 2px; } .mm-s .tiny { color: var(--text-3); }
.mm-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; } .mm-cols ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; } .mm-cols h4 { margin: 0; }
@media (max-width: 820px) { .mm-cols { grid-template-columns: 1fr; } .mm-steps li { flex-wrap: wrap; } .mm-steps li .btn { width: 100%; } }

/* ===================== KWAY หน้าขายของ ===================== */
.pg-new { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.pg-list { display: grid; gap: 10px; }
.pg-card { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 12px; }
.pg-card.off { opacity: .6; }
.pg-thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: rgba(var(--n-8-18-44), .6); display: grid; place-items: center; font-size: 34px; }
.pg-thumb img, .pg-thumb video { width: 100%; height: 100%; object-fit: cover; }
.pg-info { display: grid; gap: 3px; min-width: 0; } .pg-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pg-info a { color: var(--neon); }
.pg-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.pg-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 260px; }
.pg-ed-bg { padding: 0 !important; }
.pg-ed { width: 100vw !important; max-width: none !important; height: 100vh; max-height: none !important; border-radius: 0 !important; padding: 0 !important; display: flex; flex-direction: column; }
.pg-ed-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pg-ed-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 16px; }
.pg-ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 520px) 1fr; }
.pg-form { overflow-y: auto; padding: 14px 18px 60px; border-right: 1px solid var(--line); }
.pg-form h4 { margin: 18px 0 8px; font-family: var(--font-display); color: var(--neon); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.pg-form .field { margin-bottom: 10px; } .pg-form .field > label { font-size: 13px; color: var(--text-2); display: block; margin-bottom: 4px; }
.pg-form input[type=color] { height: 42px; padding: 4px; }
.pe-slug { display: flex; align-items: center; gap: 6px; } .pe-slug span { font: 13px var(--font-mono); color: var(--text-3); white-space: nowrap; }
.pk-media { position: relative; display: grid; place-items: center; height: 120px; border: 1px dashed var(--line-2); border-radius: 12px; overflow: hidden; cursor: pointer; background: rgba(var(--n-8-18-44), .4); }
.pk-media img, .pk-media video { width: 100%; height: 100%; object-fit: cover; } .pk-media > span { font-size: 28px; color: var(--text-3); }
.pk-m-acts { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.pe-list { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 0 0 12px; } .pe-list legend { padding: 0 6px; font-size: 13px; color: var(--text-2); }
.pe-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.pe-row { position: relative; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 30px 8px 8px; border-radius: 10px; background: rgba(var(--n-8-18-44), .35); }
.pe-c { flex: 1 1 140px; } .pe-c.w-s { flex: 0 0 80px; } .pe-c.w-m { flex: 0 0 90px; } .pe-c.w-m .pk-media { height: 80px; } .pe-c.w-m .pk-m-acts .ghost { display: none; }
.pe-c label { display: block; margin-bottom: 2px; color: var(--text-3); }
.pe-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; font-size: 12px; }
.pe-gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pe-g { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: rgba(var(--n-8-18-44), .4); }
.pe-g img, .pe-g video { width: 100%; height: 100%; object-fit: cover; }
.pe-g button { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; cursor: pointer; padding: 2px 6px; }
.pe-g.add { display: grid; place-items: center; font-size: 26px; color: var(--text-3); cursor: pointer; border-style: dashed; }
.pg-prev { padding: 16px; display: grid; grid-template-rows: 1fr auto; min-height: 0; background: rgba(var(--n-6-16-42), .35); }
.pg-dev { width: min(430px, 100%); margin: 0 auto; height: 100%; border-radius: 28px; overflow: hidden; border: 8px solid #10141c; box-shadow: 0 30px 70px rgba(0,0,0,.4); background: #fff; }
.pg-dev iframe { width: 100%; height: 100%; border: 0; display: block; }
.mp-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; }
.mp-it { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: rgba(var(--n-8-18-44), .5); color: var(--text-2); }
.mp-it:hover { border-color: var(--neon); } .mp-it.picked { border-color: var(--green); }
.mp-it img, .mp-it video { width: 100%; height: 100%; object-fit: cover; } .mp-it span { display: grid; place-items: center; gap: 4px; padding: 6px; font-size: 24px; height: 100%; } .mp-it small { font-size: 10px; line-height: 1.2; }
.pg-chat { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 12px; margin-top: 10px; align-items: center; }
.pg-chat-prev { height: 240px; border-radius: 16px; overflow: hidden; border: 5px solid #10141c; background: #fff; position: relative; }
.pg-chat-prev iframe { width: 390px; height: 820px; border: 0; transform: scale(.41); transform-origin: 0 0; pointer-events: none; }
.pg-chat-info { display: grid; gap: 6px; } .pg-chat-info a.tiny { color: var(--neon); } .pg-chat-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 820px) {
  .pg-card { grid-template-columns: 72px 1fr; } .pg-thumb { width: 72px; height: 72px; } .pg-acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .pg-ed-body { grid-template-columns: 1fr; } .pg-prev { display: none; } .pg-form { border-right: 0; }
  .pg-ed-top a.btn, #peCopy { display: none; }
  .pg-chat { grid-template-columns: 1fr; } .pg-chat-prev { display: none; }
}

/* มือถือ: เมนูซ้ายเลื่อนได้ทั้งแถบ (เห็นประวัติงาน + เครดิต + ปุ่มแอดมิน) */
@media (max-width: 820px) {
  .side { top: 0; bottom: 0; height: 100%; height: 100dvh; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .side .chat-list { flex: 0 0 auto; min-height: 0; max-height: none; overflow: visible; }
  .side .side-bottom { flex: none; }
  .side .nav-item[data-act="cmdk"] { display: none; }
}

/* ---------- KWAY Lucky: วอลเปเปอร์มงคลประจำวัน ---------- */
.nav-item.nav-lucky { color: var(--text); font-weight: 600; background: linear-gradient(90deg, rgba(255, 120, 170, .18), rgba(255, 196, 92, .12)); border-color: rgba(255, 140, 180, .45); }
.nav-item.nav-lucky:hover { background: linear-gradient(90deg, rgba(255, 120, 170, .28), rgba(255, 196, 92, .18)); }
.lk-pill { font-size: 10.5px; } .lk-pill.on { background: linear-gradient(90deg, #FF7AAE, #FFC45C); color: #2A0A1A; border-color: transparent; animation: lkPulse 2s ease-in-out infinite; }
@keyframes lkPulse { 50% { box-shadow: 0 0 14px rgba(255, 140, 180, .7); } }
.lk-banner { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; margin: 0 0 10px; cursor: pointer; color: var(--text); font: inherit; border-color: rgba(255, 140, 180, .45); background: linear-gradient(110deg, rgba(255, 120, 170, .16), rgba(255, 196, 92, .1) 60%, rgba(var(--n-14-30-68), .5)); }
.lk-banner:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(255, 140, 180, .2); }
.lk-banner .lk-ic { font-size: 28px; } .lk-banner b { display: block; } .lk-banner .tiny { display: block; color: var(--text-2); }
.modal.lk { max-width: 660px; width: 100%; }
.lk-head h2 { font-size: 24px; margin: 6px 0 4px; } .lk-head p { margin: 0 0 6px; }
.lk-sw { display: inline-flex; align-items: center; gap: 6px; } .lk-sw::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.lk-lab { display: block; font-size: 13.5px; color: var(--text-2); margin: 14px 0 6px; }
.lk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-chips button { font: inherit; font-size: 13.5px; cursor: pointer; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(var(--n-10-22-52), .5); color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; transition: .15s; }
.lk-chips button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.lk-chips button:hover { color: var(--text); border-color: rgba(255, 140, 180, .6); }
.lk-chips button.on { color: var(--text); border-color: #FF8FB8; background: rgba(255, 120, 170, .16); box-shadow: 0 0 12px rgba(255, 140, 180, .3); }
.lk-chips.big button { font-size: 14.5px; padding: 9px 14px; }
.btn.lk-go, .btn.primary.lk-go { width: 100%; justify-content: center; margin-top: 18px; padding: 14px; font-size: 16px; font-weight: 700; background: linear-gradient(90deg, #FF6FA5, #FFB547); border-color: transparent; color: #2A0A1A; }
.btn.lk-go:hover { filter: brightness(1.08); } .btn.lk-go:disabled { opacity: .5; }
.lk-fine { text-align: center; margin-top: 8px; }
.lk-note { padding: 8px 12px; border-radius: 10px; background: rgba(255, 181, 71, .14); border: 1px solid rgba(255, 181, 71, .4); font-size: 14px; }
.lk-load { text-align: center; padding: 40px 10px; }
.lk-orb { position: relative; width: 110px; height: 110px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 42px; }
.lk-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: #FF8FB8; border-right-color: #FFC45C; animation: rot 1.4s linear infinite; }
.lk-orb i + i { inset: 14px; border-top-color: var(--neon); border-right-color: transparent; border-left-color: #FF8FB8; animation-duration: 2.2s; animation-direction: reverse; }
.lk-orb span { animation: lkPulse 1.6s ease-in-out infinite; }
.lk-info { min-width: 0; }
.lk-res { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.lk-frame { border-radius: 22px; padding: 6px; background: linear-gradient(160deg, #FF8FB8, #FFC45C, var(--neon)); box-shadow: 0 10px 40px rgba(255, 140, 180, .3); }
.lk-frame img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 17px; background: #111; }
.lk-info h2 { font-size: 22px; margin: 6px 0; }
.lk-num { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; border: 1px dashed rgba(255, 196, 92, .6); background: rgba(255, 196, 92, .08); margin: 10px 0; }
.lk-num span { font-size: 13px; color: var(--text-2); } .lk-num b { font: 700 22px var(--font-mono); color: #FFC45C; letter-spacing: .06em; } .lk-num small { color: var(--text-3); font-size: 11.5px; }
.lk-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.lk-acts .btn { padding: 9px 14px; }
.lk-line { background: #06C755 !important; border-color: #06C755 !important; color: #fff !important; }
.lk-fb { background: #1877F2 !important; border-color: #1877F2 !important; color: #fff !important; }
.lk-next { font-size: 13.5px; color: var(--text-2); margin: 8px 0 10px; } .lk-next b { font-family: var(--font-mono); color: var(--text); }
.lk-hist { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.lk-hist div { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; }
.lk-hist img { width: 54px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); }
html[data-theme="light"] .lk-num b { color: #B86E00; }
@media (max-width: 600px) { .lk-res { grid-template-columns: 1fr; } .lk-frame { max-width: 230px; margin: 0 auto; } }
.share-cta.lucky-cta { border-color: rgba(255, 140, 180, .5); background: linear-gradient(120deg, rgba(255, 120, 170, .16), rgba(255, 196, 92, .1)); }
/* KWAY Daily: แท็บ / อัปโหลดรูป / สไตล์ */
.lk-left { display: inline-block; margin-top: 4px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; color: #2A0A1A; background: linear-gradient(90deg, #FF8FB8, #FFC45C); }
.lk-left.zero { background: rgba(var(--n-10-22-52), .6); color: var(--text-2); border: 1px solid var(--line-2); }
.lk-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 4px; padding: 4px; border-radius: 14px; background: rgba(var(--n-10-22-52), .6); border: 1px solid var(--line); }
.lk-tabs button { font: inherit; font-weight: 600; font-size: 14.5px; padding: 10px; border: 0; border-radius: 10px; cursor: pointer; background: transparent; color: var(--text-2); }
.lk-tabs button.on { color: #2A0A1A; background: linear-gradient(90deg, #FF8FB8, #FFC45C); }
.lk-photo { margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.lk-photo img { width: 86px; height: 86px; object-fit: cover; border-radius: 16px; border: 2px solid #FF8FB8; }
.lk-drop { width: 100%; display: grid; justify-items: center; gap: 4px; padding: 20px 12px; border-radius: 16px; cursor: pointer; font: inherit; color: var(--text); border: 2px dashed rgba(255, 140, 180, .55); background: rgba(255, 120, 170, .06); }
.lk-drop:hover { background: rgba(255, 120, 170, .12); } .lk-drop span { font-size: 30px; } .lk-drop small { color: var(--text-3); }
.lk-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin-top: 10px; cursor: pointer; } .lk-consent input { margin-top: 3px; accent-color: #FF6FA5; }
.lk-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lk-styles button { font: inherit; font-size: 13px; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(var(--n-10-22-52), .5); color: var(--text-2); transition: .15s; }
.lk-styles button span { font-size: 26px; } .lk-styles button:hover { color: var(--text); border-color: rgba(255, 140, 180, .6); }
.lk-styles button.on { color: var(--text); border-color: #FF8FB8; background: rgba(255, 120, 170, .16); box-shadow: 0 0 14px rgba(255, 140, 180, .3); }
.lk-frame.sq img { aspect-ratio: 3 / 4; }
.btn.lk-go.sm2 { margin: 6px 0 10px; padding: 11px; font-size: 15px; }
@media (max-width: 600px) { .lk-styles { grid-template-columns: repeat(4, 1fr); gap: 5px; } .lk-styles button { font-size: 11.5px; padding: 9px 2px; } .lk-styles button span { font-size: 22px; } }
.lk-frame img { object-fit: contain; }
#lkMore { white-space: normal; text-align: left; height: auto; line-height: 1.4; }
/* KWAY Daily: คอสเพลย์ */
.lk-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lk-cats button { font: inherit; font-size: 13px; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); }
.lk-cats button.on { color: var(--text); border-color: #FF8FB8; background: rgba(255, 120, 170, .16); }
.lk-cos { grid-template-columns: repeat(3, 1fr); } .lk-cos button { font-size: 12.5px; line-height: 1.3; }
.lk-blocked { display: grid; gap: 8px; justify-items: start; margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 92, 120, .12); border: 1px solid rgba(255, 92, 120, .45); font-size: 14px; }
.lk-tabs button { font-size: 13.5px; padding: 9px 6px; }
@media (max-width: 600px) { .lk-tabs { grid-template-columns: repeat(2, 1fr) !important; } .lk-cos { grid-template-columns: repeat(3, 1fr); } }
.lk-frame.pt img { aspect-ratio: 2 / 3; }
/* ควายผู้ช่วยในแผงผลงาน */
.gd { grid-column: 1 / -1; display: grid; gap: 10px; justify-items: center; padding: 8px 2px 14px; text-align: center; }
.gd-tipwrap { width: 100%; transition: opacity .25s, transform .25s; } .gd-tipwrap.out { opacity: 0; transform: translateY(6px); }
.gd-bubble { position: relative; display: grid; gap: 8px; justify-items: center; padding: 14px 14px 12px; border-radius: 16px; font-size: 14px; line-height: 1.5; color: var(--text);
  background: linear-gradient(160deg, rgba(232, 194, 122, .16), rgba(var(--n-14-30-68), .7)); border: 1px solid rgba(232, 194, 122, .5); box-shadow: 0 8px 26px rgba(0,0,0,.25); }
.gd-bubble::after { content: ''; position: absolute; bottom: -8px; left: 50%; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg); background: rgba(var(--n-14-30-68), .95); border-right: 1px solid rgba(232, 194, 122, .5); border-bottom: 1px solid rgba(232, 194, 122, .5); }
.gd-ic { font-size: 24px; }
.gd-stage { border: 0; background: transparent; padding: 0; cursor: pointer; width: 190px; animation: gdBob 3.2s ease-in-out infinite; }
.gd-stage.hop { animation: gdHop .45s ease-out, gdBob 3.2s ease-in-out .45s infinite; }
.gd-buff { width: 100%; overflow: visible; }
.gd-head { transform-origin: 128px 66px; animation: gdNod 5s ease-in-out infinite; } .gd-jaw { transform-origin: 150px 90px; animation: gdChew .34s ease-in-out infinite alternate; }
.gd-tail { transform-origin: 26px 56px; animation: gdTail 1.3s ease-in-out infinite alternate; } .gd-eye { transform-origin: center; transform-box: fill-box; animation: gdBlink 4.5s infinite; }
@keyframes gdBob { 50% { transform: translateY(-4px); } } @keyframes gdHop { 40% { transform: translateY(-18px) rotate(-3deg); } }
@keyframes gdNod { 0%, 60%, 100% { transform: rotate(0); } 70%, 85% { transform: rotate(16deg); } } @keyframes gdChew { to { transform: translateY(2px); } }
@keyframes gdTail { to { transform: rotate(16deg); } } @keyframes gdBlink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.gd-hint { margin: 0; color: var(--text-3); }
.gd-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.gd-quick button { font: inherit; font-size: 12.5px; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(var(--n-10-22-52), .5); color: var(--text-2); cursor: pointer; }
.gd-quick button:hover { color: var(--text); border-color: rgba(232, 194, 122, .6); }
@media (prefers-reduced-motion: reduce) { .gd-stage, .gd-head, .gd-jaw, .gd-tail, .gd-eye { animation: none !important; } }
/* ควายกินหญ้าระหว่างรอ */
.graze { display: flex; gap: 12px; align-items: center; margin: 8px 0 4px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(92, 214, 122, .10), transparent); border: 1px solid rgba(92, 214, 122, .25); }
.graze-buff { width: 74px; flex: 0 0 auto; overflow: visible; }
.graze > div { flex: 1; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.graze-bar { height: 6px; border-radius: 9px; background: rgba(0,0,0,.25); overflow: hidden; } .graze-bar i { display: block; height: 100%; width: 30%; border-radius: 9px; background: linear-gradient(90deg, #3BAA5A, #5CD67A, #B6F28A); animation: grazeBar 2.4s ease-in-out infinite; }
@keyframes grazeBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.gz-head { transform-origin: 128px 62px; animation: gzGraze 2.4s ease-in-out infinite; } .gz-jaw { transform-origin: 150px 86px; animation: gzChew .32s ease-in-out infinite alternate; }
.gz-tail { transform-origin: 26px 52px; animation: gzTail 1.2s ease-in-out infinite alternate; } .gz-grass { transform-origin: 140px 118px; animation: gzEat 2.4s ease-in-out infinite; }
@keyframes gzGraze { 0%, 18% { transform: rotate(0); } 32%, 78% { transform: rotate(24deg); } 100% { transform: rotate(0); } } @keyframes gzChew { to { transform: translateY(2.5px); } }
@keyframes gzTail { to { transform: rotate(18deg); } } @keyframes gzEat { 0%, 35% { transform: scaleY(1); } 70%, 90% { transform: scaleY(.35); } }
@media (prefers-reduced-motion: reduce) { .graze * { animation: none !important; } }
/* แต้มบุญ */
.merit-badge { width: 100%; margin: 8px 0 2px; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; text-align: left; font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(232, 194, 122, .4); background: linear-gradient(90deg, rgba(232, 194, 122, .14), transparent); }
.merit-badge:hover { border-color: #E8C27A; color: var(--text); } .merit-badge b { color: var(--gold, #E8C27A); } .mb-ic { grid-row: span 2; font-size: 20px; }
.mb-bar, .mt-bar { height: 5px; border-radius: 9px; background: rgba(0,0,0,.3); overflow: hidden; } .mb-bar i, .mt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E8C27A, #F6DFA6); border-radius: 9px; }
.modal.mt { max-width: 560px; } .mt-head { display: flex; gap: 14px; align-items: center; } .mt-head h2 { margin: 4px 0; font-size: 24px; } .mt-head p { margin: 0; }
.mt-ic { width: 64px; height: 64px; flex: 0 0 auto; display: grid; place-items: center; font-size: 36px; border-radius: 18px; background: radial-gradient(circle, rgba(232,194,122,.3), rgba(232,194,122,.05)); border: 1px solid rgba(232,194,122,.5); } .mt-ic.big { width: 96px; height: 96px; font-size: 56px; margin: 0 auto 10px; }
.mt-next { margin: 14px 0 6px; } .mt-bar { height: 9px; margin-bottom: 6px; }
.mt-tiers { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 14px; } .mt-tiers th, .mt-tiers td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); } .mt-tiers th { color: var(--text-3); font-weight: 500; font-size: 12px; }
.mt-tiers tr.on td { background: rgba(232, 194, 122, .12); color: var(--text); font-weight: 600; }
.mt-earn { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; font-size: 14px; } .mt-earn b { color: #5CD67A; } .mt-earn small { color: var(--text-3); }
.mt-fine { color: var(--text-3); } .mt-lv { text-align: center; padding: 10px 0; } .mt-lv h2 { font-size: 26px; margin: 6px 0; }
.pk-promo.merit { border-color: rgba(232, 194, 122, .6); background: linear-gradient(90deg, rgba(232, 194, 122, .2), transparent); }
.grass-note { margin: -8px 0 14px; color: var(--text-2); }
html[data-theme="light"] .merit-badge b { color: #B07A1E; }

.share-review { margin: 6px 2px 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 181, 71, .14); border: 1px solid rgba(255, 181, 71, .45); color: var(--text); }

/* ประเมินหญ้า + หญ้าที่ใช้ต่อผลงาน */
.tool-head .cost-est{margin-left:auto;margin-right:8px;font:600 12px/1 var(--mono,monospace);color:#7BE495;background:rgba(92,214,122,.12);border:1px solid rgba(92,214,122,.35);padding:4px 8px;border-radius:99px;white-space:nowrap}
.tool-head .cost-est[hidden]{display:none}
.asset .a-cost{position:absolute;left:8px;bottom:8px;z-index:2;pointer-events:none;font:600 11px/1 var(--mono,monospace);color:#7BE495;background:rgba(10,30,20,.65);border:1px solid rgba(92,214,122,.4);padding:4px 7px;border-radius:99px;align-self:center;white-space:nowrap}
.asset.audio .a-cost,.asset.game .a-cost{position:static;display:inline-block;margin:6px 0 0}
.tool-head .st .adm-cost{color:#FFD66B;font-weight:600}
.adm-run-cost{margin:8px 0 2px;padding:7px 11px;border-radius:10px;font-size:12.5px;color:#FFE3A3;background:rgba(232,194,122,.1);border:1px dashed rgba(232,194,122,.45)}
@media (max-width:640px){.tool-head{flex-wrap:wrap}.tool-head .st{white-space:normal}}
