@font-face { font-family: 'Noto Sans Thai'; font-weight: 400; font-display: swap; src: url(/assets/fonts/noto-sans-thai-thai-400-normal.woff2) format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Noto Sans Thai'; font-weight: 700; font-display: swap; src: url(/assets/fonts/noto-sans-thai-thai-700-normal.woff2) format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
:root {
  --navy: #00316C; --yellow: #FFEE00; --ink: #E9EDF2; --muted: #9AA6B2; --faint: #6B7682;
  --glass: rgba(13, 17, 23, 0.76); --glass-2: rgba(255, 255, 255, 0.05); --line: rgba(255, 255, 255, 0.09);
  --amber: #F2A93B; --red: #FF5B4F; --green: #45C08A; --data: #8CC4FF; --r: 10px;
  --pw: 400px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0e12; color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
canvas { display: block; }
svg { stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

#stage { position: fixed; inset: 0; }
#stage > canvas { touch-action: none; }
#ar { position: absolute; inset: 0; pointer-events: none; }
body.arMode #ar { pointer-events: auto; }
#ar video { object-fit: cover; }
#labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity 0.3s; }

/* ---------- top bar ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; height: 48px; display: flex; align-items: center; z-index: 40; background: rgba(0, 49, 108, 0.94); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
.bar .sq { width: 48px; height: 48px; background: var(--yellow); flex: none; }
.bar .t { margin-left: 16px; font-weight: bold; font-size: 16px; color: #fff; white-space: nowrap; }
.bar .br { margin-left: auto; display: flex; align-items: center; gap: 4px; padding-right: 12px; }
.bar .sim { margin-left: 8px; font-size: 11px; color: rgba(255, 255, 255, 0.82); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 20px; padding: 4px 10px; white-space: nowrap; }
.ib { display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 8px; border-radius: 8px; color: rgba(255, 255, 255, 0.9); font-size: 13px; font-weight: bold; }
.ib svg { width: 19px; height: 19px; }
.ib:hover { background: rgba(255, 255, 255, 0.1); }
.ib[aria-pressed="false"] { opacity: 0.45; }
.ib[aria-pressed="false"]::after { content: ''; position: absolute; }
#rail { display: none; margin-left: 26px; gap: 2px; }
body.live #rail { display: flex; }
#rail button { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }
#rail button i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
#rail button.on { color: #fff; background: rgba(255, 255, 255, 0.12); }
#rail button.on i { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
#rail button.done { color: rgba(255, 255, 255, 0.85); }
#rail button.done i { background: rgba(255, 255, 255, 0.85); border-color: transparent; }
#rail button:hover { color: #fff; }

/* ---------- loading and intro ---------- */
#loading { position: fixed; inset: 0; z-index: 60; background: #0b0e12 url(/assets/render/hero-sm.jpg) center / cover; display: flex; align-items: flex-end; justify-content: flex-start; padding: 0 0 9vh 6vw; transition: opacity 0.6s; }
#loading::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 11, 15, 0.85), rgba(8, 11, 15, 0.25) 60%), linear-gradient(0deg, rgba(8, 11, 15, 0.7), rgba(8, 11, 15, 0) 50%); }
#loading .in { position: relative; }
@media (min-width: 900px) { #loading { background-image: url(/assets/render/hero.jpg); } }
#loading .in { width: 260px; }
#loading .w { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
#loading .lt { font-size: 11.5px; color: var(--faint); margin-top: 10px; }
#loading .track2 { height: 2px; background: rgba(255, 255, 255, 0.1); }
#loading .fill { height: 2px; width: 0; background: var(--yellow); transition: width 0.3s; }
#intro { position: fixed; inset: 48px 0 0 0; z-index: 30; display: flex; align-items: flex-end; padding: 0 0 7vh 6vw; background: linear-gradient(90deg, rgba(8, 11, 15, 0.88) 0%, rgba(8, 11, 15, 0.55) 40%, rgba(8, 11, 15, 0) 68%), linear-gradient(0deg, rgba(8, 11, 15, 0.7), rgba(8, 11, 15, 0) 45%); transition: opacity 0.7s; }
#intro .box { max-width: 560px; }
#intro .k { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
#intro h1 { font-size: 58px; line-height: 1.02; margin: 0 0 18px; letter-spacing: -1.4px; font-weight: bold; }
#intro p { font-size: 18px; line-height: 1.5; color: #C9D1DA; margin: 0 0 30px; max-width: 500px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { border-radius: 999px; padding: 15px 24px; font-weight: bold; font-size: 15px; transition: transform 0.15s, background 0.2s, box-shadow 0.3s; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--yellow); color: #0b1a2e; }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 238, 0, 0); } 50% { box-shadow: 0 0 0 8px rgba(255, 238, 0, 0.16); } }
.fine { font-size: 12.5px; color: var(--faint); margin-top: 18px; line-height: 1.5; max-width: 460px; }
.warn { font-size: 13.5px; line-height: 1.45; color: #FFD9A0; background: rgba(242, 169, 59, 0.12); border-left: 2px solid var(--amber); padding: 10px 12px; margin: 0 0 18px; display: none; }

/* ---------- HUD ---------- */
#vig { position: fixed; top: 48px; left: 0; width: 620px; height: 300px; z-index: 19; pointer-events: none; display: none; background: radial-gradient(ellipse at 0% 0%, rgba(8, 11, 15, 0.62) 0%, rgba(8, 11, 15, 0.3) 45%, rgba(8, 11, 15, 0) 72%); }
body.live #vig { display: block; }
#hud { position: fixed; top: 70px; left: 24px; z-index: 20; display: none; pointer-events: none; width: 300px; }
body.live #hud { display: block; }
#hud .day { font-size: 60px; font-weight: bold; line-height: 0.9; letter-spacing: -2px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); white-space: nowrap; }
#hud .day small { font-size: 18px; font-weight: normal; letter-spacing: 0; color: #C9D1DA; margin-left: 8px; }
#hud.data .day { font-size: 26px; letter-spacing: -0.5px; }
#hud.data .day small { display: none; }
#hud .st { margin-top: 12px; font-size: 14px; color: #D3DAE2; line-height: 1.4; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
#hud .st b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--green); box-shadow: 0 0 10px var(--green); }
#hud.watch .st b { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
#hud.alarm .st b, #hud.trip .st b { background: var(--red); box-shadow: 0 0 12px var(--red); }
#hud.stopped .st b { background: var(--data); box-shadow: 0 0 10px var(--data); }
#spark { width: 220px; height: 38px; margin-top: 10px; opacity: 0.9; }
#hud .cr { margin-top: 8px; font-size: 12px; display: inline-flex; gap: 8px; align-items: center; background: rgba(10, 14, 19, 0.55); border: 1px solid var(--line); padding: 5px 10px; border-radius: 6px; }
#hud .cr em { font-style: normal; color: var(--faint); }
#hud .cr span { color: #B9C3CD; font-weight: bold; }
#hud .cr.bad { border-color: rgba(255, 91, 79, 0.5); background: rgba(120, 20, 14, 0.55); animation: alarmFlash 0.9s steps(2) infinite; }
#hud .cr.bad span { color: #FFB2AA; }
@keyframes alarmFlash { 50% { background: rgba(200, 40, 30, 0.6); } }

/* ---------- faceplates ---------- */
.fp { pointer-events: none; }
.fp .c { background: rgba(10, 14, 19, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 8px; padding: 7px 10px 8px; min-width: 132px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); transition: border-color 0.3s; }
.fp .tg { font-size: 10.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.fp .v { font-size: 22px; font-weight: bold; margin-top: 2px; }
.fp .v span { font-size: 11px; color: var(--muted); font-weight: normal; margin-left: 4px; }
.fp .b2 { position: relative; height: 3px; background: rgba(255, 255, 255, 0.12); margin-top: 6px; border-radius: 2px; }
.fp .b2 i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 2px; transition: width 0.25s; }
.fp .b2 em { position: absolute; top: -3px; width: 1px; height: 9px; background: var(--amber); }
.fp .b2 em.t { background: var(--red); }
.fp .stem { width: 1px; height: 24px; margin: 0 auto; background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)); }
.fp.watch .c { border-left-color: var(--amber); }
.fp.alarm .c, .fp.trip .c { border-left-color: var(--red); }
.fp.trip .v { color: #FF8A80; }
.fp.stopped .c { border-left-color: var(--data); }
body.walking .fp { opacity: 0.85; }
.pt { pointer-events: none; font-size: 12px; font-weight: bold; color: #fff; background: rgba(0, 49, 108, 0.92); padding: 4px 8px; border-radius: 5px; transform: translate(40px, -4px); white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.pt.watch { background: rgba(178, 106, 12, 0.95); }
.pt.alarm, .pt.trip { background: rgba(200, 40, 30, 0.95); }

/* ---------- tools ---------- */
#tools { position: fixed; z-index: 22; display: none; gap: 4px; padding: 5px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); left: calc((100vw - var(--pw) - 16px) / 2); bottom: 20px; transform: translateX(-50%); }
body.live #tools { display: flex; }
#tools button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 78px; padding: 8px 4px 7px; border-radius: 10px; font-size: 11.5px; color: #C9D1DA; transition: background 0.2s, color 0.2s; }
#tools button svg { width: 22px; height: 22px; }
#tools button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
#tools button.on { background: rgba(140, 196, 255, 0.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(140, 196, 255, 0.45); }
body.arMode #tools [data-t="walk"], body.arMode #tools [data-t="orbit"] { display: none; }
#tourbar { position: fixed; z-index: 22; display: none; gap: 6px; left: calc((100vw - var(--pw) - 16px) / 2); transform: translateX(-50%); bottom: 96px; }
body.walking #tourbar { display: flex; }
#tourbar button { padding: 8px 13px; border-radius: 999px; font-size: 12.5px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); white-space: nowrap; }
#tourbar button:hover { background: rgba(255, 255, 255, 0.12); }
#joy { position: fixed; z-index: 23; left: 26px; bottom: 120px; width: 112px; height: 112px; border-radius: 50%; background: rgba(10, 14, 19, 0.45); border: 1px solid rgba(255, 255, 255, 0.18); display: none; touch-action: none; }
#joy i { position: absolute; left: 34px; top: 34px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
#lift { position: fixed; z-index: 23; right: calc(var(--pw) + 40px); bottom: 120px; display: none; flex-direction: column; gap: 8px; }
#lift button { width: 52px; height: 52px; border-radius: 50%; background: rgba(10, 14, 19, 0.6); border: 1px solid rgba(255, 255, 255, 0.22); font-size: 16px; color: #fff; touch-action: none; }
@media (pointer: coarse) { body.walking #joy, body.walking #lift { display: flex; } body.walking #joy { display: block; } }
body.walking #hud .st, body.walking #spark { display: none; }

/* ---------- info card ---------- */
#info { position: fixed; z-index: 24; left: 24px; bottom: 100px; width: 330px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px 12px; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.25s, transform 0.25s; }
#info.on { opacity: 1; transform: none; pointer-events: auto; }
#info .ih { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#info .tg { font-size: 11px; color: var(--data); font-weight: bold; letter-spacing: 0.4px; }
#info h3 { margin: 3px 0 0; font-size: 18px; }
#info .x { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
#info .x svg { width: 16px; height: 16px; }
#info .x:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
#info .sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
#info .sub b { color: #fff; }
#info p { font-size: 13.5px; line-height: 1.5; color: #CFD6DE; margin: 8px 0 10px; }
#info .lv { display: grid; gap: 4px; margin-bottom: 10px; }
#info .lv div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 9px; background: rgba(255, 255, 255, 0.04); border-radius: 6px; }
#info .lv span { color: var(--muted); }
#info .ia { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
#info .ia button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 9px; font-size: 11px; color: #D3DAE2; background: rgba(255, 255, 255, 0.05); }
#info .ia button svg { width: 19px; height: 19px; }
#info .ia button:hover { background: rgba(255, 255, 255, 0.1); }
#info .ia button.on { background: rgba(140, 196, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(140, 196, 255, 0.45); }

/* ---------- Co-worker panel ---------- */
#panel { position: fixed; z-index: 25; display: none; flex-direction: column; background: var(--glass); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); transition: transform 0.35s ease; }
body.live #panel { display: flex; }
@media (min-width: 900px) { #panel { top: 64px; right: 16px; bottom: 16px; width: var(--pw); border-radius: 16px; } body.panelMin #panel { transform: translateX(calc(100% - 64px)); } }
.ph { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-bottom: 1px solid var(--line); }
#orb { width: 44px; height: 44px; flex: none; }
.who { flex: 1; min-width: 0; }
.who .n { font-weight: bold; font-size: 15px; }
.who .s { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib.sm { color: var(--muted); }
#feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 6px; scroll-behavior: smooth; }
#feed::-webkit-scrollbar { width: 6px; } #feed::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
.quiet { font-size: 12.5px; color: var(--faint); padding: 8px 2px 4px; line-height: 1.5; }
.m { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: #E1E6EC; animation: rise 0.45s ease both; }
.m .src { display: inline-block; margin-left: 8px; font-size: 10px; color: var(--data); border: 1px solid rgba(140, 196, 255, 0.4); border-radius: 10px; padding: 1px 6px; vertical-align: 1px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.m.me { margin-left: 22%; background: rgba(255, 255, 255, 0.08); border-radius: 12px 12px 4px 12px; padding: 9px 12px; }
.m.sys { font-weight: bold; font-size: 13px; padding: 10px 12px; border-radius: 8px; }
.m.sys.alarm { background: rgba(242, 169, 59, 0.14); color: #FFD08A; border-left: 2px solid var(--amber); }
.m.sys.trip { background: rgba(255, 91, 79, 0.16); color: #FFB2AA; border-left: 2px solid var(--red); }
.typing { padding: 4px 0 14px; }
.typing i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 5px; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.card { background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 13px; margin: 0 0 12px; animation: rise 0.45s ease both; }
.card h4 { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); font-weight: normal; }
.ev { display: grid; gap: 8px; }
.ev div { border-left: 2px solid var(--data); padding: 1px 0 1px 10px; animation: rise 0.4s ease both; }
.ev b { display: block; font-size: 13px; }
.ev span { font-size: 12.5px; color: var(--muted); }
.chart canvas { width: 100%; height: 150px; }
.leg { display: flex; gap: 14px; font-size: 11px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.leg i { display: inline-block; width: 14px; height: 2px; vertical-align: 3px; margin-right: 5px; background: var(--ink); }
.leg i.p { background: repeating-linear-gradient(90deg, var(--data) 0 4px, transparent 4px 7px); }
.leg i.a { background: var(--amber); } .leg i.t { background: var(--red); }
.rec .row { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; }
.rec .row:first-of-type { border-top: 0; padding-top: 2px; }
.rec .when { color: var(--yellow); font-weight: bold; font-size: 12.5px; }
.rec .own { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.wo { display: grid; grid-template-columns: 70px 1fr; gap: 7px 10px; font-size: 13px; margin: 0; }
.wo dt { color: var(--muted); } .wo dd { margin: 0; } .wo dd.g { color: #8FE3BC; }
.out .verdict { font-size: 17px; font-weight: bold; margin: 2px 0 12px; line-height: 1.35; }
.out table { width: 100%; border-collapse: collapse; font-size: 13px; }
.out th { text-align: left; font-weight: normal; color: var(--muted); padding: 6px 4px; font-size: 12px; }
.out td { padding: 9px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.out td.g { color: #8FE3BC; } .out td.b { color: #FFB2AA; }
#dock { border-top: 1px solid var(--line); padding: 10px 12px 12px; }
#acts { display: flex; flex-wrap: wrap; gap: 8px; }
#acts:empty { display: none; }
#acts .btn { flex: 1 1 auto; padding: 13px 16px; font-size: 14px; }
#acts + #sugg { margin-top: 10px; }
#sugg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
#sugg::-webkit-scrollbar { display: none; }
#sugg button { flex: none; font-size: 12px; color: #C9D1DA; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); white-space: nowrap; }
#sugg button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
#askf { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
#askf input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 14px; padding: 8px 4px; }
#askf input::placeholder { color: var(--faint); }
#askf .mic, #askf .snd { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #C9D1DA; }
#askf svg { width: 18px; height: 18px; }
#askf .snd { background: rgba(255, 255, 255, 0.1); }
#askf .mic.on { background: var(--red); color: #fff; animation: pulseR 1.2s infinite; }
@keyframes pulseR { 50% { box-shadow: 0 0 0 7px rgba(255, 91, 79, 0.2); } }

/* ---------- agents ---------- */
#agents { position: fixed; z-index: 21; bottom: 104px; left: calc((100vw - var(--pw) - 16px) / 2); transform: translate(-50%, 10px); width: min(740px, calc(100vw - var(--pw) - 60px)); background: rgba(10, 14, 19, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 4px; opacity: 0; pointer-events: none; transition: opacity 0.4s, transform 0.4s; }
#agents.vis { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#agents .ah { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 2px 4px 0; }
#agents .ah span { font-size: 10.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 10px; padding: 1px 7px; }
#agents .ah .x { margin-left: auto; color: var(--muted); font-size: 18px; width: 26px; height: 26px; }
#agents svg { width: 100%; height: auto; display: block; stroke: none; }
#agents .e { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.4; }
#agents .e.flow { stroke: var(--data); stroke-width: 2; stroke-dasharray: 6 8; animation: dash 0.6s linear infinite; filter: drop-shadow(0 0 4px rgba(140, 196, 255, 0.9)); }
@keyframes dash { to { stroke-dashoffset: -14; } }
#agents .n { cursor: pointer; }
#agents .n circle { fill: #17202b; stroke: rgba(255, 255, 255, 0.3); stroke-width: 1.4; }
#agents .n .halo { fill: none; stroke: none; }
#agents .hub circle { fill: #2a2a10; stroke: var(--yellow); }
#agents .hub .ic { fill: var(--yellow); font-weight: bold; font-size: 13px; text-anchor: middle; }
#agents .hub .hl { text-anchor: start; font-weight: bold; font-size: 13px; fill: #fff; }
#agents .n.work .halo { stroke: var(--data); stroke-width: 2; stroke-dasharray: 20 120; animation: spin 1s linear infinite; transform-origin: 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
#agents .ag.done circle:not(.halo) { fill: #12331f; stroke: var(--green); }
#agents .hub.done circle:not(.halo) { fill: #3a3a10; }
#agents text { fill: #D3DAE2; font-size: 12px; text-anchor: middle; font-family: Arial, sans-serif; }
#agents .nm { font-weight: bold; font-size: 11.5px; }
#agents .fd { fill: #8FE3BC; font-size: 10.5px; }
#agents .src rect { fill: rgba(255, 255, 255, 0.04); stroke: rgba(255, 255, 255, 0.16); }
#agents .src text { font-size: 10.5px; fill: var(--muted); }
#agents .src.on rect { fill: rgba(140, 196, 255, 0.18); stroke: var(--data); }
#agents .src.on text { fill: #fff; }
#agents .atip { font-size: 12.5px; line-height: 1.45; color: #CFD6DE; padding: 0 6px; max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; }
#agents .atip.on { max-height: 80px; padding: 4px 6px 8px; }

/* ---------- Data Studio ---------- */
#studio { position: fixed; inset: 0; z-index: 55; background: rgba(5, 8, 11, 0.62); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; }
#studio.on { display: flex; }
#studio .sd { width: min(1040px, 100%); max-height: 100%; overflow: auto; background: #10151c; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
#studio .sh { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
#studio .k { font-size: 12px; color: var(--data); font-weight: bold; letter-spacing: 0.5px; }
#studio h2 { margin: 4px 0 0; font-size: 21px; }
#studio .x { font-size: 26px; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; }
#studio .x:hover { background: rgba(255, 255, 255, 0.08); }
#studio .sb { display: grid; grid-template-columns: 290px 1fr; }
#studio .src { padding: 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
#studio .lbl { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
#studio .list { display: grid; gap: 8px; }
#studio .it { text-align: left; padding: 11px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
#studio .it b { display: block; font-size: 14px; }
#studio .it em { display: inline-block; font-style: normal; font-size: 10.5px; color: var(--data); margin: 3px 0 4px; }
#studio .it span { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
#studio .it.on { border-color: rgba(140, 196, 255, 0.6); background: rgba(140, 196, 255, 0.08); }
#studio .up { display: block; padding: 11px 12px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, 0.25); cursor: pointer; }
#studio .up input { display: none; }
#studio .up b { display: block; font-size: 14px; } #studio .up span { font-size: 12px; color: var(--muted); }
#studio .up:hover { border-color: var(--data); }
#studio .work { padding: 16px 20px 18px; min-width: 0; }
#studio .pipe { display: flex; gap: 6px; margin-bottom: 12px; }
#studio .stg { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--faint); padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); transition: all 0.3s; }
#studio .stg i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
#studio .stg.run { color: #fff; border-color: var(--data); }
#studio .stg.run i { border-color: var(--data); border-top-color: transparent; animation: spin 0.8s linear infinite; }
#studio .stg.done { color: #CFE9DA; } #studio .stg.done i { background: var(--green); border-color: var(--green); }
#studio .map { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
#studio .map label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
#studio select { background: #1a212b; color: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 13px; max-width: 280px; }
#sdChart { width: 100%; height: 220px; background: rgba(255, 255, 255, 0.02); border-radius: 10px; }
#studio .stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0; }
#studio .stats div { background: rgba(255, 255, 255, 0.04); border-radius: 8px; padding: 7px 9px; }
#studio .stats span { display: block; font-size: 10.5px; color: var(--faint); }
#studio .stats b { font-size: 13.5px; }
#studio .explain { font-size: 14px; line-height: 1.5; color: #E1E6EC; min-height: 42px; }
#studio .explain b { color: var(--yellow); margin-right: 6px; }
#studio .act { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
#studio .act .btn { padding: 12px 18px; font-size: 14px; }
#studio .cred { font-size: 11.5px; color: var(--faint); margin-top: 10px; }

/* ---------- toast, room ---------- */
#toast { position: fixed; left: 50%; top: 64px; transform: translate(-50%, -8px); z-index: 50; background: rgba(10, 14, 19, 0.92); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; max-width: 90vw; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#room { position: fixed; inset: 0; z-index: 45; display: none; pointer-events: none; }
#room .top { position: absolute; top: 60px; left: 14px; right: 14px; display: flex; gap: 8px; justify-content: flex-end; pointer-events: auto; }
#room .top .btn { padding: 10px 16px; font-size: 13px; }
#room .hint { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(10, 14, 19, 0.78); padding: 10px 16px; border-radius: 999px; font-size: 14px; white-space: nowrap; }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  :root { --pw: 0px; }
  .bar .t { display: none; }
  #rail { margin-left: 6px; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 210px); }
  #rail::-webkit-scrollbar { display: none; }
  #rail button span { display: none; }
  #rail button.on span { display: inline; }
  #rail button { padding: 6px 7px; }
  .bar .sim { display: none; }
  .ib span { display: none; }
  #intro { padding: 0 22px 30px; background: linear-gradient(0deg, rgba(8, 11, 15, 0.95) 0%, rgba(8, 11, 15, 0.72) 48%, rgba(8, 11, 15, 0) 78%); }
  #intro h1 { font-size: 40px; letter-spacing: -0.8px; }
  #intro p { font-size: 15.5px; margin-bottom: 22px; }
  .btn { padding: 14px 20px; font-size: 14.5px; }
  .cta .btn { flex: 1 1 100%; }
  #hud { top: 58px; left: 14px; width: 60vw; }
  #hud .day { font-size: 30px; letter-spacing: -1px; }
  #hud .day small { font-size: 13px; }
  #hud.data .day { font-size: 16px; }
  #hud .st { display: none; }
  #spark { width: 130px; height: 26px; margin-top: 6px; }
  #hud .cr { font-size: 10.5px; padding: 3px 7px; margin-top: 4px; }
  #panel { left: 0; right: 0; bottom: 0; height: 44%; border-radius: 18px 18px 0 0; border-bottom: 0; }
  body.panelMin #panel { transform: translateY(calc(100% - 64px)); }
  body.roomMode #panel { height: 34%; }
  .ph { padding: 8px 10px; }
  #orb { width: 38px; height: 38px; }
  .m { font-size: 14px; }
  .chart canvas { height: 118px; }
  #dock { padding: 8px 10px 10px; }
  #acts .btn { padding: 11px 14px; font-size: 13.5px; }
  #sugg { display: none; }
  #tools { left: 50%; bottom: calc(44% + 10px); padding: 4px; border-radius: 12px; }
  body.panelMin #tools { bottom: 76px; }
  #tools button { width: 62px; padding: 6px 2px 5px; font-size: 10px; }
  #tools button svg { width: 19px; height: 19px; }
  #tourbar { left: 0; right: 0; transform: none; bottom: calc(44% + 78px); overflow-x: auto; padding: 0 12px; scrollbar-width: none; }
  body.panelMin #tourbar { bottom: 144px; }
  #joy { bottom: calc(44% + 140px); left: 18px; width: 100px; height: 100px; }
  #lift { right: 16px; bottom: calc(44% + 140px); }
  #joy i { left: 29px; top: 29px; width: 40px; height: 40px; }
  #info { left: 10px; right: 10px; width: auto; bottom: calc(44% + 78px); padding: 11px 12px 10px; }
  #info p { font-size: 12.5px; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  #info .lv { display: none; }
  #agents { top: 54px; bottom: auto; left: 50%; width: calc(100vw - 12px); padding: 4px 6px 2px; transform: translate(-50%, -10px); }
  body.agentsOn #hud { opacity: 0; }
  #agents text { font-size: 14px; } #agents .nm { font-size: 13px; } #agents .fd { font-size: 12px; } #agents .src text { font-size: 12.5px; }
  .fp .c { min-width: 98px; padding: 5px 8px 6px; }
  .fp .v { font-size: 16px; }
  .fp .tg { font-size: 9.5px; }
  #vig { width: 100%; height: 200px; }
  #labels { clip-path: inset(110px 0 0 0); }
  #studio { padding: 0; }
  #studio .sd { border-radius: 0; height: 100%; }
  #studio .sb { grid-template-columns: 1fr; }
  #studio .src { border-right: 0; border-bottom: 1px solid var(--line); }
  #studio .stats { grid-template-columns: repeat(3, 1fr); }
  #studio .pipe .stg span { font-size: 10.5px; }
  #studio .stg { padding: 6px; gap: 4px; }
  #sdChart { height: 170px; }
}

/* ---------- talk (live voice) ---------- */
.talkbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--yellow); color: #0b1a2e; font-weight: bold; font-size: 13px; }
.talkbtn svg { width: 17px; height: 17px; }
body.talking .talkbtn { background: rgba(255, 91, 79, 0.9); color: #fff; }
body.talking .talkbtn span { font-size: 0; } body.talking .talkbtn span::after { content: 'End'; font-size: 13px; }
#talk { position: fixed; z-index: 26; left: calc((100vw - var(--pw) - 16px) / 2); bottom: 104px; transform: translateX(-50%); width: min(560px, calc(100vw - 40px)); display: none; flex-direction: column; align-items: center; pointer-events: none; }
body.talking #talk { display: flex; }
#tkOrb { width: 150px; height: 150px; }
#talk .tk-cap { text-align: center; min-height: 20px; margin-bottom: 4px; }
#talk .tk-ai { font-size: 19px; line-height: 1.45; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9); max-height: 5.8em; overflow: hidden; }
#talk .tk-me { font-size: 14px; color: #BFD9F5; margin-top: 6px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
#talk .tk-st { font-size: 12px; color: #D3DAE2; letter-spacing: 0.3px; margin-top: -6px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
#talk .tk-b { display: flex; gap: 10px; margin-top: 10px; pointer-events: auto; }
#talk .tk-b button { height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; background: rgba(10, 14, 19, 0.75); border: 1px solid rgba(255, 255, 255, 0.2); display: inline-flex; align-items: center; gap: 8px; font-weight: bold; font-size: 13px; }
#talk .tk-b button svg { width: 19px; height: 19px; }
#talk .tk-b button.on { background: var(--red); }
#talk .tk-b .end { background: rgba(200, 40, 30, 0.85); }
body.talking #tools { opacity: 0.55; }
body.talking #tools:hover { opacity: 1; }

/* ---------- views menu ---------- */
#viewmenu { position: fixed; z-index: 23; display: none; flex-direction: column; gap: 2px; padding: 5px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); left: calc((100vw - var(--pw) - 16px) / 2 + 2px); bottom: 98px; transform: translateX(-50%); }
body.viewsOpen #viewmenu { display: flex; }
#viewmenu button { text-align: left; padding: 9px 16px; border-radius: 8px; font-size: 13px; color: #D3DAE2; min-width: 150px; }
#viewmenu button:hover { background: rgba(255, 255, 255, 0.08); }
#viewmenu button.on { background: rgba(140, 196, 255, 0.16); color: #fff; }

/* ---------- plant health ---------- */
#health { position: fixed; z-index: 20; left: 24px; top: 330px; width: 270px; display: none; background: rgba(10, 14, 19, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px 6px; }
body.live #health { display: block; }
#health .hh { display: flex; justify-content: space-between; font-size: 12px; margin: 0 2px 6px; }
#health .hh span { color: var(--faint); }
#health .hr { display: grid; grid-template-columns: 1fr 54px 26px; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; border-radius: 7px; text-align: left; font-size: 11.5px; color: #C9D1DA; }
#health .hr:hover { background: rgba(255, 255, 255, 0.07); }
#health .hn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#health .hb { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; }
#health .hb i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); transition: width 0.5s; }
#health .hr.warn .hb i { background: var(--amber); } #health .hr.bad .hb i { background: var(--red); }
#health .hr b { text-align: right; font-size: 12px; }
#health .hr.bad b { color: #FF8A80; } #health .hr.warn b { color: #FFD08A; }
body.walking #health, body.infoOn #health { display: none !important; }

/* ---------- case card, sliders ---------- */
.case .ch { display: flex; justify-content: space-between; font-size: 11px; }
.case .tg { color: var(--data); font-weight: bold; }
.case .rk { padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); }
.case .rk.high { color: #FFB2AA; border-color: rgba(255, 91, 79, 0.5); } .case .rk.medium { color: #FFD08A; border-color: rgba(242, 169, 59, 0.5); } .case .rk.low { color: #8FE3BC; border-color: rgba(69, 192, 138, 0.5); }
.case .ct { color: #fff !important; font-size: 15px !important; font-weight: bold !important; margin: 6px 0 2px !important; }
.case .ca { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.case canvas { width: 100%; height: 110px; margin-bottom: 10px; }
.case .wo { margin-top: 10px; grid-template-columns: 78px 1fr; }
.case .wo dd.b { color: #FFB2AA; }
.btn.sm { padding: 9px 14px; font-size: 12.5px; margin-top: 10px; }
#info .sl { display: block; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
#info .sl b { color: #fff; }
#info .sl input { width: 100%; margin-top: 6px; accent-color: #8CC4FF; }
#info .hint2 { font-size: 12px; color: var(--data); margin: -2px 0 10px; }

@media (max-width: 899px) {
  #health { top: auto; left: 10px; right: auto; bottom: calc(44% + 78px); width: 200px; padding: 6px 7px 4px; display: none; }
  body.live.panelMin #health { display: block; bottom: 150px; }
  #health .hr { grid-template-columns: 1fr 36px 22px; font-size: 10.5px; padding: 4px 2px; }
  #talk { left: 50%; bottom: 150px; }
  #tkOrb { width: 120px; height: 120px; }
  #talk .tk-ai { font-size: 16px; }
  body.talking #tools { display: none; }
  #viewmenu { left: 50%; bottom: calc(44% + 82px); }
  body.panelMin #viewmenu { bottom: 150px; }
  .talkbtn span { display: none; }
}

/* ---------- resizable, collapsible panel ---------- */
#panelGrip { position: absolute; left: -6px; top: 0; bottom: 0; width: 12px; cursor: ew-resize; z-index: 2; }
#panelGrip::after { content: ''; position: absolute; left: 4px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); transition: background 0.2s; }
#panelGrip:hover::after, body.resizing #panelGrip::after { background: var(--yellow); }
body.resizing, body.resizing * { cursor: ew-resize !important; user-select: none; }
#panelTab { display: none; }
@media (min-width: 900px) {
  body.panelMin #panel { transform: translateX(calc(100% + 24px)); }
  body.panelMin #panelTab { display: flex; position: fixed; right: 0; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; padding: 18px 10px; border-radius: 12px 0 0 12px; background: var(--yellow); color: #0b1a2e; font-weight: bold; font-size: 13px; z-index: 27; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }
  body.panelMin { --pw: 0px; }
}
@media (max-width: 899px) { #panelGrip { display: none; } }

/* ---------- showcase ---------- */
.callout { pointer-events: none; display: flex; align-items: center; gap: 8px; transform: translate(10px, -10px); animation: rise 0.6s ease both; }
.callout i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--yellow); background: rgba(255, 238, 0, 0.25); box-shadow: 0 0 12px rgba(255, 238, 0, 0.6); flex: none; }
.callout span { font-size: 12.5px; font-weight: bold; color: #fff; background: rgba(10, 14, 19, 0.82); border: 1px solid rgba(255, 255, 255, 0.16); padding: 5px 9px; border-radius: 6px; white-space: nowrap; }
#showcaseBar { position: fixed; z-index: 24; top: 64px; left: calc((100vw - var(--pw) - 16px) / 2); transform: translate(-50%, -8px); display: flex; gap: 12px; align-items: center; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(10, 14, 19, 0.82); border: 1px solid var(--line); font-size: 13.5px; font-weight: bold; opacity: 0; pointer-events: none; transition: opacity 0.4s, transform 0.4s; }
#showcaseBar button { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 12.5px; }
body.showcasing #showcaseBar { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.showcasing #vig { display: block; width: 100vw; height: 100vh; top: 0; background: radial-gradient(ellipse at calc(50% - var(--pw) / 2) 50%, rgba(8, 11, 15, 0) 30%, rgba(8, 11, 15, 0.72) 85%); transition: background 0.6s; }
body.showcasing #health, body.showcasing .fp { opacity: 0.25; }
body.showcasing #labels { z-index: 20; }

/* ---------- cinematic opening ---------- */
#cine i { position: fixed; left: 0; right: 0; height: 7vh; background: #000; z-index: 29; transition: transform 1.2s cubic-bezier(.7, 0, .2, 1); pointer-events: none; }
#cine i:first-child { top: 48px; } #cine i:last-child { bottom: 0; }
body.live #cine i:first-child { transform: translateY(-110%); } body.live #cine i:last-child { transform: translateY(110%); }
#lowerThird { position: fixed; right: 5vw; bottom: calc(7vh + 28px); z-index: 31; font-size: 14px; color: #fff; padding-left: 14px; border-left: 2px solid var(--yellow); opacity: 0; transform: translateY(8px); transition: opacity 0.6s, transform 0.6s; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); pointer-events: none; }
#lowerThird.on { opacity: 1; transform: none; }
body.live #lowerThird { display: none; }
#intro { background: linear-gradient(90deg, rgba(5, 8, 12, 0.82) 0%, rgba(5, 8, 12, 0.42) 38%, rgba(5, 8, 12, 0) 62%) !important; padding-bottom: calc(7vh + 40px) !important; }
#intro .k span { display: inline-block; animation: up 1s 0.3s cubic-bezier(.2, .8, .2, 1) both; }
#intro h1 { font-size: clamp(48px, 7.4vw, 104px) !important; line-height: 0.92 !important; letter-spacing: -0.035em !important; margin-bottom: 26px !important; }
#intro h1 span { display: block; overflow: hidden; }
#intro h1 span:first-child { animation: up 1.1s 0.5s cubic-bezier(.2, .8, .2, 1) both; }
#intro h1 span:last-child { animation: up 1.1s 0.7s cubic-bezier(.2, .8, .2, 1) both; color: var(--yellow); }
#intro p { animation: up 1s 1.0s cubic-bezier(.2, .8, .2, 1) both; }
#intro .stats { display: flex; gap: 34px; margin: 0 0 30px; animation: up 1s 1.2s cubic-bezier(.2, .8, .2, 1) both; }
#intro .stats b { display: block; font-size: 30px; letter-spacing: -0.5px; }
#intro .stats span { font-size: 12.5px; color: var(--muted); }
#intro .cta { animation: up 1s 1.4s cubic-bezier(.2, .8, .2, 1) both; }
#intro .fine { animation: up 1s 1.6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (max-width: 899px) {
  #cine i { height: 4vh; }
  #intro .stats { gap: 18px; } #intro .stats b { font-size: 22px; }
  #lowerThird { right: 18px; top: 70px; bottom: auto; font-size: 12.5px; }
  #showcaseBar { left: 50%; top: 58px; }
}

/* ---------- agent swarm ---------- */
.swtag { pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swtag > span { font-size: 10.5px; font-weight: bold; color: #0b1a2e; background: var(--c); padding: 2px 7px; border-radius: 10px; white-space: nowrap; box-shadow: 0 0 14px var(--c); }
.swtag .bub { display: none; max-width: 230px; font-size: 12.5px; line-height: 1.4; color: #fff; background: rgba(10, 14, 19, 0.9); border: 1px solid rgba(255, 255, 255, 0.15); border-left: 3px solid var(--c); padding: 7px 10px; border-radius: 8px; text-align: left; animation: rise 0.35s ease both; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
.swtag.talk .bub { display: block; }
.swtag.challenge .bub { border-left-color: var(--red); }
.swtag.challenge .bub::before { content: 'Challenge: '; color: #FFB2AA; font-weight: bold; }
.swtag.decide .bub { max-width: 300px; font-size: 13.5px; border: 1px solid var(--yellow); border-left: 4px solid var(--yellow); }
.swtag.agree > span::after { content: ' agrees'; }
.ev .deb { border-left-color: var(--amber); }
.card.dec { border-color: rgba(255, 238, 0, 0.45); }
.card.dec div { font-size: 14px; line-height: 1.45; }
.case .crow { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- decision to action ---------- */
.wocard { pointer-events: none; width: 230px; background: rgba(10, 14, 19, 0.92); border: 1px solid rgba(255, 238, 0, 0.6); border-radius: 10px; padding: 10px 12px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 0 22px rgba(255, 238, 0, 0.25); transform: translateY(-20px); }
.wocard .wh { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); }
.wocard .wh b { font-size: 13px; color: var(--yellow); }
.wocard .wj { font-size: 13.5px; font-weight: bold; color: #fff; margin: 5px 0 6px; line-height: 1.3; }
.wocard .ws { font-size: 12px; color: #8FE3BC; }
.wocard.done { border-color: var(--green); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 0 22px rgba(69, 192, 138, 0.35); }
.pin { pointer-events: none; display: flex; flex-direction: column; align-items: center; transform: translateY(-50%); animation: rise 0.4s ease both; }
.pin span { font-size: 12px; font-weight: bold; color: #0b1a2e; background: var(--yellow); padding: 4px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4); }
.pin i { order: 2; width: 2px; height: 26px; background: linear-gradient(var(--yellow), rgba(255, 238, 0, 0)); }
.pin.done span { background: var(--green); }
#sched { position: fixed; z-index: 24; left: calc((100vw - var(--pw) - 16px) / 2); bottom: 104px; transform: translate(-50%, 16px); width: min(760px, calc(100vw - var(--pw) - 50px)); background: rgba(10, 14, 19, 0.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; opacity: 0; pointer-events: none; transition: opacity 0.4s, transform 0.4s; }
#sched.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#sched .sh { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
#sched .sh span { color: var(--faint); font-size: 11.5px; }
#sched .sh button { margin-left: auto; font-size: 18px; color: var(--muted); width: 26px; height: 26px; }
#sched .steps { display: flex; gap: 6px; margin-bottom: 10px; }
#sched .steps div { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); padding: 6px 8px; border-radius: 7px; background: rgba(255, 255, 255, 0.04); transition: all 0.3s; }
#sched .steps i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
#sched .steps div.on { color: #CFE9DA; background: rgba(69, 192, 138, 0.12); }
#sched .steps div.on i { background: var(--green); border-color: var(--green); }
#sched .grid { position: relative; }
#sched .days { display: flex; justify-content: space-between; margin-left: 80px; font-size: 10px; color: var(--faint); margin-bottom: 4px; }
#sched .row { display: flex; align-items: center; height: 26px; margin-bottom: 4px; }
#sched .row em { width: 80px; font-style: normal; font-size: 11.5px; color: var(--muted); flex: none; }
#sched .lane { position: relative; flex: 1; height: 100%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px calc(100% / 14)); border-radius: 5px; }
#sched .job { position: absolute; top: 2px; bottom: 2px; background: rgba(140, 196, 255, 0.22); border: 1px solid rgba(140, 196, 255, 0.4); border-radius: 5px; overflow: hidden; transition: left 1s cubic-bezier(.2, .8, .2, 1); }
#sched .job span { display: block; font-size: 10px; color: #D3DAE2; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sched .job.moved { background: rgba(242, 169, 59, 0.2); border-color: rgba(242, 169, 59, 0.6); }
#sched .job.new { background: rgba(255, 238, 0, 0.25); border-color: var(--yellow); transform: translateY(-40px); opacity: 0; transition: transform 0.8s cubic-bezier(.2, .8, .2, 1), opacity 0.8s; z-index: 2; }
#sched .job.new.in { transform: none; opacity: 1; }
#sched .job.new span { color: #fff; font-weight: bold; }
@media (max-width: 899px) { #sched { left: 50%; top: 56px; bottom: auto; width: calc(100vw - 12px); padding: 8px 10px; } #sched .steps span { display: none; } #sched .row em { width: 62px; font-size: 10.5px; } #sched .days { margin-left: 62px; } }
body.schedOn #health { display: none !important; }

/* while agents fly on the equipment, the network panel becomes a small dock so the action stays visible */
@media (min-width: 900px) {
  body.swarming #agents.vis { width: 360px; left: auto; right: calc(var(--pw) + 32px); bottom: auto; top: 64px; transform: none; opacity: 0.92; padding: 4px 6px 2px; }
  body.swarming #agents .atip { display: none; }
  body.swarming #health { opacity: 0.35; }
}
@media (max-width: 899px) { body.swarming #agents.vis { opacity: 0; pointer-events: none; } }

.fp .sp { display: block; width: 100%; height: 18px; margin-top: 3px; opacity: 0.9; }
@media (max-width: 899px) { .fp .sp { height: 12px; } }

/* ---------- VR ---------- */
#vrExit { display: none; position: fixed; z-index: 60; top: 10px; left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(10, 14, 19, 0.7); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; font-size: 12px; font-weight: bold; }
body.vrMode #vrExit { display: block; }
body.vrMode .bar, body.vrMode #panel, body.vrMode #panelTab, body.vrMode #hud, body.vrMode #health, body.vrMode #tools, body.vrMode #vig, body.vrMode #info, body.vrMode #labels, body.vrMode #talk, body.vrMode #agents, body.vrMode #sched, body.vrMode #toast:not(.on), body.vrMode #showcaseBar, body.vrMode #cine { display: none !important; }
body.vrMode #stage > canvas { touch-action: none; }

body.arMode #tools [data-t="vr"], body.arMode #tools [data-t="walk"], body.arMode #tools [data-t="orbit"] { display: none !important; }
body.roomMode #room .top { z-index: 40; }
body.arMode #health:not(.open) .hr:not(.worst) { display: none; }
body.arMode #health .hh { cursor: pointer; }
body.arMode #health .hh span::after { content: '  +'; }
body.arMode #health.open .hh span::after { content: '  \2212'; }
body.roomMode #toast { top: 112px; }
body.roomMode #sched { top: 112px; }

/* language */
.langsw { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; max-width: 640px; }
.langsw button { padding: 7px 14px; font-size: 13.5px; color: #C9D1DA; background: rgba(10,14,19,0.5); border: 1px solid var(--line); border-radius: 999px; }
.langsw button.on { background: var(--yellow); color: #0b1a2e; font-weight: bold; }
#btnLang { font-weight: bold; font-size: 13px; min-width: 44px; }
html.lang-th body, html.lang-th button, html.lang-th input, html.lang-th textarea { font-family: Arial, 'Noto Sans Thai', 'Thonburi', 'Leelawadee UI', sans-serif; }
html.lang-th body { line-height: 1.55; }
html.lang-x #panel, html.lang-x .card, html.lang-x #info { overflow-wrap: break-word; }
@media (max-width: 899px) { #intro .langsw { margin-top: 56px; } html.lang-x #intro .stats span { font-size: 12px; line-height: 1.35; } }
html.lang-x #intro h1 { line-height: 1.12; }
html.lang-th .swtag.agree > span::after { content: ' เห็นด้วย'; }
html[lang="ms"] .swtag.agree > span::after { content: ' setuju'; }
html[lang="id"] .swtag.agree > span::after { content: ' setuju'; }
html[lang="vi"] .swtag.agree > span::after { content: ' đồng ý'; }
html[lang="zh-TW"] .swtag.agree > span::after { content: ' 同意'; }
html[lang="zh-CN"] .swtag.agree > span::after { content: ' 同意'; }
html[lang="fil"] .swtag.agree > span::after { content: ' sang-ayon'; }
html.lang-x #health { line-height: 1.3; }
html.lang-x #health .hh { flex-wrap: wrap; gap: 2px 8px; }
html.lang-x #health .hr { padding-top: 5px; padding-bottom: 5px; }

/* hands mode (poster AR) */
#tools [data-t="hands"] { display: none; }
body.posterMode #tools [data-t="hands"] { display: flex; }
#handLayer { position: fixed; inset: 0; pointer-events: none; z-index: 18; display: none; }
body.handsOn #handLayer { display: block; }
#handLayer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#handLayer .hcur { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--yellow); opacity: 0; transition: opacity 0.2s, width 0.15s, height 0.15s, left 0.15s, top 0.15s; }
#handLayer.seen .hcur { opacity: 1; }
#handLayer .hcur.pinch { width: 18px; height: 18px; left: -9px; top: -9px; background: var(--yellow); }
#handLayer .hcur.open { width: 120px; height: 120px; left: -60px; top: -60px; border-width: 2px; background: radial-gradient(circle, rgba(140,196,255,0.18), rgba(140,196,255,0) 70%); border-color: #8CC4FF; }
#handLayer .hcur.point { width: 22px; height: 22px; left: -11px; top: -11px; box-shadow: 0 0 0 8px rgba(255,238,0,0.18); }
#handLayer .hchip { position: absolute; left: 50%; top: 168px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: 90vw; background: rgba(10,14,19,0.86); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; color: #E9EDF2; }
#handLayer .hchip i { width: 9px; height: 9px; border-radius: 50%; background: #6B7682; flex: none; }
#handLayer.seen .hchip i { background: #3DDC97; }
#handLayer.loading .hchip i { background: #F5A524; }

/* bring your own drawing */
#sugg .drawq, #sugg .wifq { border-color: rgba(255,238,0,0.5); color: #FFEE00; }
#drawing { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(5,8,12,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#drawing.on { display: flex; }
#drawing .dbox { width: min(920px, 94vw); max-height: 92vh; overflow: auto; background: #0E141B; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 18px; }
#drawing .dh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#drawing .dh b { font-size: 17px; }
#drawing .x { font-size: 24px; color: #C9D1DA; padding: 0 6px; }
#drawing .dstart p { color: #C9D1DA; line-height: 1.5; margin: 4px 0 16px; }
#drawing .dstart .btn { display: inline-flex; cursor: pointer; }
#drawing .fine { margin-top: 14px; font-size: 12.5px; color: #8A96A3; }
#drawing .dview { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 760px) { #drawing .dview { grid-template-columns: 1fr; } }
#drawing .dimg { position: relative; border-radius: 10px; overflow: hidden; background: #000; align-self: start; }
#drawing .dimg img { display: block; width: 100%; height: auto; }
#drawing .dimg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#drawing svg rect { fill: rgba(255,238,0,0.08); stroke: #FFEE00; stroke-width: 4; vector-effect: non-scaling-stroke; }
#drawing svg circle { fill: #FFEE00; }
#drawing svg text { fill: #0b1a2e; font: bold 18px Arial; text-anchor: middle; }
#drawing svg .p-high rect { stroke: #FF5B4F; fill: rgba(255,91,79,0.1); } #drawing svg .p-high circle { fill: #FF5B4F; }
#drawing .dscan { position: absolute; left: 0; right: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, #FFEE00, transparent); opacity: 0; }
#drawing.busy .dscan { opacity: 1; animation: dscan 1.6s linear infinite; }
@keyframes dscan { from { top: 0; } to { top: 100%; } }
#drawing .dout .sum { color: #E9EDF2; line-height: 1.5; margin-top: 0; }
#drawing .dout ol { padding-left: 20px; margin: 8px 0 0; }
#drawing .dout li { margin: 0 0 10px; color: #C9D1DA; line-height: 1.45; }
#drawing .dout li b { color: #fff; } #drawing .dout li span { color: #8A96A3; font-size: 12.5px; }
#drawing .dout li.p-high::marker { color: #FF5B4F; }
#drawing .dconsent { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
#drawing .dconsent p { margin: 0 0 12px; color: #E9EDF2; line-height: 1.5; }
#drawing .dconsent .row { display: flex; gap: 10px; flex-wrap: wrap; }

#btnLang { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#langMenu { position: fixed; top: 52px; right: 12px; z-index: 70; display: none; flex-direction: column; min-width: 190px; background: #0E141B; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,0.5); }
body.langOpen #langMenu { display: flex; }
#langMenu button { text-align: left; padding: 9px 12px; border-radius: 8px; color: #E9EDF2; font-size: 14px; }
#langMenu button:hover { background: rgba(255,255,255,0.07); }
#langMenu button.on { color: #0b1a2e; background: var(--yellow); font-weight: bold; }
html.lang-zh body, html.lang-zh button, html.lang-zh input { font-family: Arial, 'PingFang TC', 'PingFang SC', 'Microsoft JhengHei', 'Microsoft YaHei', 'Noto Sans CJK TC', 'Noto Sans CJK SC', sans-serif; }
html.lang-zh body { line-height: 1.55; }
@media (max-width: 899px) { #intro .box { min-width: 0; } #intro .langsw { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 64px; width: calc(100vw - 44px); max-width: calc(100vw - 44px); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } #intro .langsw::-webkit-scrollbar { display: none; } .langsw button { padding: 6px 11px; font-size: 12.5px; flex: none; } }
