/* Layout: rail ซ้าย (เดสก์ท็อป) / แถบเมนูล่าง (มือถือ) + พื้นที่เนื้อหากว้างสุด 1320px
   ธีมมืดแบบเดียวโดยตั้งใจ (คงอัตลักษณ์ “เมืองลอยฟ้ายามค่ำ” ของเวอร์ชันเดิม) */
:root {
  color-scheme: dark;
  --bg: #050d1a;
  --bg-2: #0a1729;
  --surface: rgba(12, 26, 46, .74);
  --surface-solid: #0c1a2e;
  --surface-2: rgba(255, 255, 255, .035);
  --line: rgba(160, 200, 255, .13);
  --line-2: rgba(160, 200, 255, .24);
  --ink: #eaf3ff;
  --muted: #a3b5cc;
  --dim: #7d91ad;
  --cyan: #68e8ff;
  --violet: #a981ff;
  --pink: #ff7dc8;
  --gold: #ffc85d;
  --green: #74f2b0;
  --red: #ff6e82;
  --slate: #93a6c4;
  --mock: #c9b8ff;
  --on-accent: #051120;
  --f-display: "Manrope", "IBM Plex Sans Thai", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Thai", "Manrope", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-l: 22px; --r-m: 14px; --r-s: 10px;
  --rail: 248px;
  --top: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(circle at 30% 0%, #13274a 0, var(--bg) 46%, #030914 100%) fixed, var(--bg);
  color: var(--ink); font: 400 15px/1.6 var(--f-body);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
img { max-width: 100%; }
code, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
code { font-size: .86em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
svg:not(.ic):not(.chart):not(.scene-lines):not(.bot) { width: 20px; height: 20px; }

.aurora { position: fixed; border-radius: 50%; filter: blur(120px); opacity: .2; pointer-events: none; z-index: -1; }
.aurora-a { width: 520px; height: 520px; background: #205dff; left: -180px; top: 12%; }
.aurora-b { width: 560px; height: 560px; background: #9d4dff; right: -220px; bottom: -220px; }

/* ---------- brand ---------- */
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-family: var(--f-display); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-size: 15px; letter-spacing: .16em; }
.brand-text small { font-size: 9px; color: var(--dim); letter-spacing: .26em; margin-top: 7px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; flex: none; background: linear-gradient(135deg, #8a72ff, #49dcff); display: grid; place-content: center; grid-template-columns: repeat(3, 4px); gap: 3px; box-shadow: 0 0 30px rgba(96, 209, 255, .28); }
.brand-mark i { display: block; width: 4px; border-radius: 3px; background: #fff; }
.brand-mark i:nth-child(1) { height: 11px; } .brand-mark i:nth-child(2) { height: 19px; } .brand-mark i:nth-child(3) { height: 14px; }

/* ---------- rail ---------- */
.rail {
  position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: var(--rail);
  padding: calc(22px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 28px;
  background: linear-gradient(180deg, rgba(4, 11, 24, .92), rgba(4, 11, 24, .78));
  border-right: 1px solid var(--line); backdrop-filter: blur(18px);
}
.rail .brand { padding: 0 6px; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; transition: background .2s var(--ease), color .2s; }
.rail-link:hover { background: var(--surface-2); color: var(--ink); }
.rail-link.active { background: linear-gradient(90deg, rgba(104, 232, 255, .14), rgba(169, 129, 255, .06)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.rail-link.active .ic { color: var(--cyan); }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font: 700 12px var(--f-display); background: var(--red); color: var(--on-accent); }
.rail-safe { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding: 13px; border-radius: var(--r-m); background: rgba(116, 242, 176, .06); border: 1px solid rgba(116, 242, 176, .18); }
.rail-safe b { display: block; font-size: 13px; color: var(--green); }
.rail-safe small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* ---------- shell / topbar ---------- */
.shell { margin-left: var(--rail); min-width: 0; padding-bottom: 24px; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; min-height: var(--top);
  display: flex; align-items: center; gap: 16px;
  padding-block: 12px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(5, 13, 26, .94), rgba(5, 13, 26, .78)); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand-compact { display: none; }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title .eyebrow { margin: 0 0 2px; }
.topbar-title h1 { font: 800 clamp(19px, 2.1vw, 24px)/1.2 var(--f-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { font: 700 11px/1.3 var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin: 0 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 500; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); white-space: nowrap; }
.chip-source::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); }
.chip-source.src-mock { color: var(--mock); border-style: dashed; border-color: rgba(201, 184, 255, .5); }
.chip-source.src-mock::before { background: var(--mock); }
.chip-source.src-static-file::before, .chip-source.src-live-readonly::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.chip-source.src-local-file::before { background: var(--cyan); }
.chip-fresh.stale { color: var(--gold); border-color: rgba(255, 200, 93, .4); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--cyan); }
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sourcebar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  margin: 16px max(28px, env(safe-area-inset-right, 0px)) 0 max(28px, env(safe-area-inset-left, 0px));
  padding: 11px 16px; border-radius: var(--r-m); font-size: 14px;
}
.sourcebar b { font-weight: 600; }
.sourcebar span { color: var(--muted); }
.sourcebar.is-mock { border: 1px dashed rgba(201, 184, 255, .45); color: var(--mock); background: repeating-linear-gradient(-45deg, rgba(201, 184, 255, .07) 0 10px, rgba(201, 184, 255, .025) 10px 20px); }
.sourcebar.is-alert { border: 1px solid rgba(255, 200, 93, .4); color: var(--gold); background: rgba(255, 200, 93, .07); }
.linkish { border: 0; background: none; padding: 0; color: var(--cyan); text-decoration: underline; cursor: pointer; }

main { display: block; padding-block: 20px 8px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); max-width: calc(1320px + 56px); outline: none; }
main > div { display: flex; flex-direction: column; gap: 22px; }
.view-in { animation: viewIn .38s var(--ease) both; }
@keyframes viewIn { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loading { display: flex; align-items: center; gap: 12px; padding: 40px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--cyan); animation: spin .8s linear infinite; }

.foot { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: space-between; padding-block: 18px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); font-size: 12px; color: var(--dim); max-width: calc(1320px + 56px); }

/* ---------- generic ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; backdrop-filter: blur(16px); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .section-head h2 { font: 700 17px/1.3 var(--f-display); letter-spacing: -.01em; }
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--cyan); text-decoration: none; }
.more:hover { text-decoration: underline; }
.more .ic { width: 15px; height: 15px; }
.tag-mock { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--mock); border: 1px dashed rgba(201, 184, 255, .55); background: rgba(201, 184, 255, .07); white-space: nowrap; }
.section-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 0; font-size: 13px; color: var(--dim); }
.fine { font-size: 12px; color: var(--dim); margin: 0; }
.lead { color: var(--muted); margin: 0 0 14px; max-width: 70ch; }
.empty { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 0; padding: 8px 0; }
.empty .ic { color: var(--green); }
.empty-page { display: grid; gap: 10px; justify-items: start; padding: 28px; }
.empty-page p { margin: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; flex: none; border: 1px solid transparent; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-run { color: var(--cyan); background: rgba(104, 232, 255, .1); border-color: rgba(104, 232, 255, .25); }
.pill-run i { box-shadow: 0 0 0 0 rgba(104, 232, 255, .6); animation: ping 1.8s ease-out infinite; }
.pill-ok { color: var(--green); background: rgba(116, 242, 176, .09); border-color: rgba(116, 242, 176, .22); }
.pill-wait { color: var(--slate); background: rgba(147, 166, 196, .1); border-color: rgba(147, 166, 196, .22); }
.pill-warn { color: var(--gold); background: rgba(255, 200, 93, .1); border-color: rgba(255, 200, 93, .28); }
.pill-err { color: var(--red); background: rgba(255, 110, 130, .1); border-color: rgba(255, 110, 130, .3); }
.pill-off { color: var(--dim); background: var(--surface-2); border-color: var(--line); }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(104, 232, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(104, 232, 255, 0); } }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--slate); }
.dot.ok, .dot-ok { background: var(--green); box-shadow: 0 0 10px rgba(116, 242, 176, .6); }
.dot-run { background: var(--cyan); box-shadow: 0 0 10px rgba(104, 232, 255, .6); }
.dot-warn { background: var(--gold); } .dot-err { background: var(--red); box-shadow: 0 0 10px rgba(255, 110, 130, .6); } .dot-wait { background: var(--slate); } .dot-off { background: var(--dim); }
.rail-safe .dot { margin-top: 6px; }

.bar { height: 6px; border-radius: 99px; background: rgba(160, 200, 255, .1); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); background: var(--slate); }
.bar-run span { background: linear-gradient(90deg, #4fd3f0, var(--cyan)); position: relative; overflow: hidden; }
.bar-run span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: sheen 2.2s ease-in-out infinite; }
@keyframes sheen { to { transform: translateX(100%); } }
.bar-ok span { background: var(--green); } .bar-warn span { background: var(--gold); } .bar-err span { background: var(--red); } .bar-wait span { background: var(--slate); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--ink); transition: border-color .2s, transform .15s var(--ease), background .2s; }
.btn:active { transform: scale(.98); }
.btn-s { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-primary { border: 0; color: var(--on-accent); background: linear-gradient(90deg, #82ebff, #a98cff); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-locked { color: var(--dim); background: repeating-linear-gradient(-45deg, rgba(160, 200, 255, .05) 0 6px, transparent 6px 12px); border-style: dashed; cursor: not-allowed; }
.btn-locked:hover { color: var(--muted); border-color: rgba(255, 110, 130, .45); }
.btn-locked .ic { width: 15px; height: 15px; color: var(--red); }

/* ---------- summary ---------- */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-width: 0; transition: border-color .2s, transform .2s var(--ease); }
.stat-link:hover { border-color: var(--line-2); transform: translateY(-2px); }
.stat-k { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.stat-k .ic { width: 15px; height: 15px; color: var(--dim); }
.num { font: 800 30px/1.15 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.num em { font-style: normal; font-size: 18px; color: var(--dim); font-weight: 700; }
.num-s { font-size: 22px; line-height: 1.5; }
.stat small { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.is-err { border-color: rgba(255, 110, 130, .4); background: linear-gradient(160deg, rgba(255, 110, 130, .1), var(--surface)); }
.stat.is-err .num, .stat.is-err .stat-k .ic { color: var(--red); }
.stat.is-warn .num { color: var(--gold); }

/* ---------- overview ---------- */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.main-stack, .side-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.overview-grid .timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; }
.campus-card { padding: 16px; }
.campus-card .card-head { padding: 4px 4px 0; }
.campus { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; border: 1px solid var(--line-2); background: var(--bg-2); }
.campus img { width: 100%; height: 100%; object-fit: cover; display: block; }
.campus::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 13, 26, .05), rgba(5, 13, 26, .2)); pointer-events: none; }
.hotspot { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 12px; text-decoration: none; color: #fff; background: rgba(3, 10, 24, .8); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px); box-shadow: 0 10px 26px rgba(0, 0, 0, .32); transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; max-width: 46%; }
.hotspot:hover, .hotspot:focus-visible { transform: translate(-50%, -50%) translateY(-4px) scale(1.04); border-color: rgba(117, 229, 255, .8); box-shadow: 0 16px 36px rgba(0, 0, 0, .42), 0 0 22px rgba(88, 218, 255, .22); }
.hs-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--slate); }
.hs-run .hs-dot { background: var(--cyan); animation: ping 1.8s ease-out infinite; }
.hs-ok .hs-dot { background: var(--green); } .hs-warn .hs-dot { background: var(--gold); } .hs-err .hs-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 110, 130, .25); }
.hs-code { display: none; font: 800 11px var(--f-display); letter-spacing: .04em; }
.hs-body { min-width: 0; }
.hs-body b, .hs-body small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-body b { font-size: 12.5px; line-height: 1.35; }
.hs-body small { font-size: 11px; color: #b9c8dc; }
.campus-hint { margin: 12px 4px 2px; font-size: 12.5px; color: var(--dim); }

.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-m); text-decoration: none; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.att:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .055); }
.att-err { border-color: rgba(255, 110, 130, .32); }
.att-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.att-top small { color: var(--dim); font-size: 12px; }
.att b { font-size: 14.5px; }
.att-msg { font-size: 13px; color: var(--muted); line-height: 1.5; }

.timeline { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-size: 12.5px; color: var(--cyan); padding-top: 2px; }
.timeline b { display: block; font-size: 14px; }
.timeline small { display: block; font-size: 12.5px; color: var(--dim); }

.studio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.studio-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; padding: 18px; transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; }
.studio-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-head > div { flex: 1; min-width: 0; }
.sc-head b { display: block; font: 700 15.5px/1.3 var(--f-display); }
.sc-head small { display: block; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orb { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font: 800 13px var(--f-display); color: var(--acc); background: color-mix(in srgb, var(--acc) 15%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); }
.orb-l { width: 60px; height: 60px; border-radius: 18px; font-size: 18px; }
.acc-cyan { --acc: var(--cyan); } .acc-pink { --acc: var(--pink); } .acc-violet { --acc: var(--violet); } .acc-gold { --acc: var(--gold); } .acc-red { --acc: var(--red); }
.wf-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wf-mini li { display: grid; gap: 6px; }
.wf-mini-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; }
.wf-mini-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }

/* ---------- studio detail ---------- */
.switcher { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; margin-bottom: -4px; }
.switcher a { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 14px; border-radius: 99px; text-decoration: none; font-size: 13.5px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, color .2s; }
.switcher a:hover { color: var(--ink); border-color: var(--line-2); }
.switcher a.active { color: var(--ink); border-color: var(--cyan); background: rgba(104, 232, 255, .08); }
.studio-hero { display: flex; gap: 18px; align-items: flex-start; padding: 24px; border-radius: var(--r-l); border: 1px solid var(--line); background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--acc) 16%, transparent), transparent 55%), var(--surface); }
.studio-hero > div { flex: 1; min-width: 0; }
.studio-hero .eyebrow { color: var(--acc); }
.studio-hero h2 { font: 800 clamp(24px, 3vw, 32px)/1.15 var(--f-display); letter-spacing: -.03em; }
.studio-hero p:not(.eyebrow) { color: var(--muted); margin: 8px 0 0; max-width: 68ch; }
.wf-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wf { display: flex; flex-direction: column; gap: 16px; }
.wf-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.wf-head h3 { font: 700 17px/1.3 var(--f-display); }
.wf-head small { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.wf-progress { display: grid; gap: 7px; }
.wf-progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.stepper li { flex: 1 0 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 15px); right: calc(50% + 15px); height: 2px; background: var(--line-2); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--green); }
.node { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--f-mono); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--dim); position: relative; z-index: 1; }
.node .ic { width: 14px; height: 14px; }
.done .node { background: rgba(116, 242, 176, .14); border-color: rgba(116, 242, 176, .45); color: var(--green); }
.now .node { color: var(--on-accent); border: 0; }
.now-run .node { background: var(--cyan); box-shadow: 0 0 0 5px rgba(104, 232, 255, .16); }
.now-err .node { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 110, 130, .18); }
.now-warn .node { background: var(--gold); box-shadow: 0 0 0 5px rgba(255, 200, 93, .16); }
.now-ok .node, .now-wait .node, .now-off .node { background: var(--slate); }
.lbl { font-size: 11.5px; line-height: 1.35; color: var(--dim); max-width: 92px; }
.now .lbl { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts div { padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: 11.5px; color: var(--dim); }
.facts dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wf-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.wf-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); margin-top: auto; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }

/* ---------- runs ---------- */
.runs { list-style: none; margin: 0; padding: 0; }
.run { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.run:last-child { border-bottom: 0; }
.run time { font-size: 13px; color: var(--muted); line-height: 1.3; }
.run time small { display: block; font: 500 11px var(--f-body); color: var(--dim); }
.run-main b { display: block; font-size: 14px; font-weight: 600; }
.run-main small { display: block; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-dur { font-size: 12.5px; color: var(--dim); text-align: right; min-width: 70px; }
.day-head { font: 700 12px var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin: 18px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.day-head:first-of-type { margin-top: 4px; }
.more-btn { margin-top: 14px; width: 100%; }
.count-note { margin-left: auto; font-size: 13px; color: var(--dim); }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 8px; }
.filters-bar { margin: 0; }
.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--dim); min-width: 0; }
.field.grow { flex: 1 1 220px; }
.field select, .field input { height: 40px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 12px; font-size: 14px; color: var(--ink); min-width: 0; width: 100%; }
.field select { padding-right: 30px; }
.field input::placeholder { color: var(--dim); }
.segs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); }
.seg { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s; }
.seg:hover { color: var(--ink); }
.seg.on { background: var(--surface-solid); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

.chart-card { padding-bottom: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin: -4px 0 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.k-ok, .b-ok { background: var(--green); fill: var(--green); }
.k-warn, .b-warn { background: var(--gold); fill: var(--gold); }
.k-err, .b-err { background: var(--red); fill: var(--red); }
.chart-scroll { overflow-x: auto; }
.chart { width: 100%; min-width: 460px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--dim); font: 500 11px var(--f-body); }
.chart .axis-now { fill: var(--cyan); font-weight: 700; }
.chart rect { transition: opacity .2s; }
.chart rect:hover { opacity: .8; }

/* ---------- errors ---------- */
.err-list { display: flex; flex-direction: column; gap: 12px; }
.err { display: grid; gap: 8px; padding: 16px 18px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.err-err:not(.is-resolved) { border-color: rgba(255, 110, 130, .35); background: linear-gradient(100deg, rgba(255, 110, 130, .08), var(--surface) 40%); }
.err-warn:not(.is-resolved) { border-color: rgba(255, 200, 93, .28); }
.err.is-resolved { opacity: .78; }
.err-list.compact .err { padding: 12px 14px; background: var(--surface-2); }
.err-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.err-top time { margin-left: auto; font-size: 12.5px; color: var(--dim); }
.sev { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.sev .ic { width: 15px; height: 15px; }
.sev-err { color: var(--red); } .sev-warn { color: var(--gold); } .sev-info { color: var(--cyan); }
.err-msg { margin: 0; font-size: 14.5px; line-height: 1.55; }
.err-where { margin: 0; font-size: 12.5px; color: var(--dim); }
.err-where a { color: var(--cyan); text-decoration: none; }
.err-hint { margin: 0; font-size: 13px; color: var(--muted); padding: 9px 12px; border-radius: var(--r-s); background: var(--surface-2); }
.err-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }

/* ---------- connection ---------- */
.conn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.kv { margin: 0; display: grid; gap: 0; }
.kv div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv dt { font-size: 13.5px; color: var(--muted); }
.kv dd { margin: 0; font-size: 13.5px; font-weight: 600; text-align: right; }
.nots { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nots li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.nots .ic { width: 16px; height: 16px; color: var(--red); margin-top: 3px; }
.file-row { display: flex; flex-wrap: wrap; gap: 10px; }
.file-btn { cursor: pointer; }
.file-report { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-m); font-size: 13.5px; }
.file-report p { margin: 0 0 4px; }
.file-report ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.file-report.ok { background: rgba(116, 242, 176, .07); border: 1px solid rgba(116, 242, 176, .22); }
.file-report.has-issues { background: rgba(255, 200, 93, .07); border: 1px solid rgba(255, 200, 93, .28); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font: 700 13px var(--f-mono); color: var(--cyan); background: rgba(104, 232, 255, .1); border: 1px solid rgba(104, 232, 255, .25); }
.steps b { font-size: 14.5px; }
.steps span { font-size: 13.5px; color: var(--muted); }
.code { margin: 0; max-height: 320px; overflow: auto; padding: 14px 16px; border-radius: var(--r-m); background: #030914; border: 1px solid var(--line); font: 500 12.5px/1.6 var(--f-mono); color: #bfe9ff; }
.attempts { list-style: none; margin: 0; padding: 0; }
.attempts li { display: grid; grid-template-columns: 54px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.attempts small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- sheet / toast ---------- */
.sheet-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(1, 6, 15, .72); backdrop-filter: blur(12px); }
.sheet { position: relative; width: min(500px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 26px; border: 1px solid var(--line-2); background: linear-gradient(150deg, #10213b, #07111f); box-shadow: 0 40px 120px rgba(0, 0, 0, .55); animation: sheetIn .3s var(--ease) both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.lock-orb { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; color: var(--red); background: rgba(255, 110, 130, .12); border: 1px solid rgba(255, 110, 130, .3); }
.lock-orb svg { width: 26px; height: 26px; }
.sheet .eyebrow { color: var(--red); }
.sheet h2 { font: 800 24px/1.25 var(--f-display); letter-spacing: -.02em; }
.sheet-lead { color: var(--muted); margin: 8px 0 16px; }
.lock-reasons { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.lock-reasons li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.lock-reasons svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 2px; }
.sheet-foot { font-size: 12.5px; color: var(--dim); margin: 0 0 18px; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); }
.sheet .btn-primary { width: 100%; }

.toast { position: fixed; z-index: 70; right: max(24px, env(safe-area-inset-right, 0px)); top: calc(var(--top) + 14px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 10px; max-width: min(380px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; font-size: 14px; background: #0b1d30; border: 1px solid rgba(104, 232, 255, .3); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: none; }
.toast svg { color: var(--green); }
.noscript { padding: 40px; text-align: center; }

/* ---------- tabbar (mobile) ---------- */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .studio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-grid .side-stack { order: -1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  :root { --rail: 0px; }
  .rail { display: none; }
  .brand-compact { display: flex; }
  .wf-list, .two-col, .conn-grid { grid-template-columns: minmax(0, 1fr); }
  .shell { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: rgba(4, 11, 24, .94); backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 12px; text-decoration: none; color: var(--dim); font-size: 11.5px; font-weight: 500; min-width: 0; }
  .tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tab .ic { width: 22px; height: 22px; }
  .tab.active { color: var(--ink); background: rgba(104, 232, 255, .08); }
  .tab.active .ic { color: var(--cyan); }
  .tab .count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }
}
@media (max-width: 760px) {
  .topbar, main, .foot { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .sourcebar { margin-left: max(16px, env(safe-area-inset-left, 0px)); margin-right: max(16px, env(safe-area-inset-right, 0px)); font-size: 13px; }
  .topbar { gap: 12px; }
  .topbar .eyebrow { display: none; }
  .chip-fresh { display: none; }
  .chip { height: 30px; padding: 0 10px; font-size: 12px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .summary-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 13px 14px; }
  .num { font-size: 26px; }
  .num-s { font-size: 18px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; border-radius: 18px; }
  .campus-card { padding: 12px; }
  .hotspot { padding: 6px 9px 6px 7px; gap: 6px; border-radius: 10px; max-width: none; }
  .hs-body { display: none; }
  .hs-code { display: block; }
  .hs-dot { width: 9px; height: 9px; }
  .studio-hero { padding: 18px; gap: 14px; flex-wrap: wrap; }
  .orb-l { width: 48px; height: 48px; font-size: 15px; border-radius: 14px; }
  .studio-hero > .pill { order: -1; margin-left: auto; }
  .studio-hero > div { flex-basis: 100%; }
  .run { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
  .run-dur { display: none; }
  .timeline li { grid-template-columns: 96px minmax(0, 1fr); }
  .err-top time { margin-left: 0; width: 100%; order: 3; }
  .attempts li { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .attempts small { display: none; }
  .filters .segs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg { flex: none; }
  .toast { left: 16px; right: 16px; max-width: none; }
}
@media (max-width: 420px) {
  .summary-3 { grid-template-columns: minmax(0, 1fr); }
  .summary-3 .stat { flex-direction: row; align-items: center; justify-content: space-between; }
  .chip-source { max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
  .facts dd { font-size: 13px; }
  .sheet { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- ฉากเมืองลอยฟ้า ---------- */
.scene { position: relative; overflow: hidden; border-radius: 26px; border: 1px solid var(--line-2); background: #0a1729; aspect-ratio: 1672 / 941; max-height: 80vh; min-height: 380px; width: 100%; touch-action: none; isolation: isolate; user-select: none; -webkit-user-select: none; cursor: grab; }
.scene.is-dragging { cursor: grabbing; }
.scene button, .scene a { cursor: pointer; }
.scene-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; --k: 1; }
.scene-world.anim { transition: transform .9s cubic-bezier(.22, .9, .24, 1); }
.scene-world picture, .scene-world img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-world img { object-fit: cover; transition: filter 1.4s ease; }
.scene-tint { position: absolute; inset: 0; background: linear-gradient(180deg, #0b1440 0%, #10204a 50%, #1a1438 100%); mix-blend-mode: multiply; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.scene.is-night .scene-world img { filter: brightness(.7) saturate(1.2) contrast(1.06) hue-rotate(-8deg); }
.scene.is-night .scene-tint { opacity: .7; }
.scene-lights { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; }
.scene.is-night .scene-lights { opacity: 1; }
.scene-lights i { position: absolute; width: calc(1.5% / var(--k)); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,226,160,.95) 0, rgba(255,200,120,.45) 30%, rgba(255,190,110,0) 70%); mix-blend-mode: screen; animation: flicker 4.5s ease-in-out infinite; }
.scene-lights i:nth-child(3n) { background: radial-gradient(circle, rgba(140,220,255,.95) 0, rgba(110,200,255,.4) 30%, rgba(110,200,255,0) 70%); }
@keyframes flicker { 0%, 100% { opacity: .95; } 50% { opacity: .55; } }
.scene-stars { position: absolute; inset: 0 0 55% 0; pointer-events: none; opacity: 0; transition: opacity 1.6s; background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 46% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 81% 6%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 92% 24%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 37% 30%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 71% 32%, #fff 50%, transparent 51%); }
.scene.is-night .scene-stars { opacity: .7; }
.scene-clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.scene-clouds i { position: absolute; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,255,255,.75), rgba(255,255,255,0) 65%); filter: blur(6px); animation: drift 60s linear infinite; transform: translateX(calc(var(--px, 0) * -30px)); }
.scene-clouds i:nth-child(1) { width: 44%; height: 26%; left: -10%; bottom: -8%; }
.scene-clouds i:nth-child(2) { width: 36%; height: 20%; right: -8%; bottom: -6%; animation-duration: 80s; animation-direction: reverse; }
.scene-clouds i:nth-child(3) { width: 30%; height: 16%; left: 40%; bottom: -10%; animation-duration: 95s; }
.scene.is-night .scene-clouds i { opacity: .25; }
@keyframes drift { from { margin-left: -4%; } to { margin-left: 4%; } }

.isl-glow { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen; opacity: .55; }
.isl-glow.g-err { background: radial-gradient(ellipse, rgba(255,80,100,.75) 0, rgba(255,80,100,.25) 40%, rgba(255,80,100,0) 70%); animation: alarm 1.8s ease-in-out infinite; }
.isl-glow.g-warn { background: radial-gradient(ellipse, rgba(255,190,70,.6) 0, rgba(255,190,70,.2) 40%, rgba(255,190,70,0) 70%); animation: alarm 3.2s ease-in-out infinite; }
.isl-glow.g-run { background: radial-gradient(ellipse, rgba(90,210,255,.5) 0, rgba(90,210,255,.15) 45%, rgba(90,210,255,0) 70%); }
.isl-glow.g-ok, .isl-glow.g-wait, .isl-glow.g-off { display: none; }
.scene:not(.is-night) .isl-glow { mix-blend-mode: normal; }
.scene:not(.is-night) .isl-glow.g-run { opacity: .35; }
.isl-glow.g-err::after, .isl-glow.g-warn::after { content: ""; position: absolute; inset: 22% 18%; border-radius: 50%; border: 3px solid rgba(255,90,114,.85); animation: ring 1.8s ease-out infinite; }
.isl-glow.g-warn::after { border-color: rgba(255,190,70,.8); animation-duration: 3.2s; }
@keyframes ring { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.15); opacity: 0; } }
@keyframes alarm { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }

/* 2D life layer: island hover, blinking room lights, and moving elevators. */
.campus-life { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.island-life { --life: 105,220,255; position: absolute; transform: translate(-50%, -50%); border-radius: 50%; animation: islandHover 5.8s ease-in-out infinite; animation-delay: var(--life-delay); }
.island-life::before { content: ""; position: absolute; inset: 18% 12%; border-radius: 50%; border: 2px solid rgba(var(--life),.34); box-shadow: inset 0 0 24px rgba(var(--life),.12), 0 0 20px rgba(var(--life),.14); animation: islandPulse 2.8s ease-in-out infinite; animation-delay: var(--life-delay); }
.island-life > i { position: absolute; width: calc(7px / var(--k)); height: calc(7px / var(--k)); border-radius: 50%; background: rgb(var(--life)); box-shadow: 0 0 calc(14px / var(--k)) rgb(var(--life)); animation: roomBlink 2.4s steps(2,end) infinite; }
.island-life > i:nth-child(1) { left: 24%; top: 39%; animation-delay: var(--life-delay); }
.island-life > i:nth-child(2) { right: 23%; top: 32%; animation-delay: calc(var(--life-delay) - .8s); }
.island-life > i:nth-child(3) { left: 53%; bottom: 22%; animation-delay: calc(var(--life-delay) - 1.45s); }
.life-ok { --life: 92,235,174; }
.life-run { --life: 76,215,255; }
.life-warn { --life: 255,194,82; }
.life-err { --life: 255,84,112; }
.life-wait, .life-off { --life: 155,174,202; opacity: .55; }
.elevator-fx { position: absolute; width: calc(5px / var(--k)); height: 16%; transform: translate(-50%, -50%); border-radius: 99px; background: linear-gradient(180deg, transparent 0%, rgba(100,225,255,.95) 45%, transparent 70%); filter: drop-shadow(0 0 8px rgba(90,220,255,.9)); animation: elevatorMove 2.7s ease-in-out infinite; animation-delay: var(--e-delay); }
@keyframes islandHover { 0%,100% { margin-top: 0; } 50% { margin-top: calc(-5px / var(--k)); } }
@keyframes islandPulse { 0%,100% { transform: scale(.93); opacity: .32; } 50% { transform: scale(1.04); opacity: .9; } }
@keyframes roomBlink { 0%,42% { opacity: .22; } 43%,72% { opacity: 1; } 73%,100% { opacity: .48; } }
@keyframes elevatorMove { 0%,100% { margin-top: 5%; opacity: .15; } 45% { margin-top: -5%; opacity: .95; } }

.scene-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bridge-base { fill: none; stroke: rgba(150,220,255,.0); stroke-width: 3; }
.bridge-flow { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 18 140; animation: flow 2.4s linear infinite; filter: drop-shadow(0 0 6px currentColor); }
.f-run { stroke: #7fe3ff; color: #7fe3ff; }
.f-warn { stroke: #ffc65c; color: #ffc65c; animation-duration: 4s; }
.f-err { stroke: #ff5a72; color: #ff5a72; stroke-dasharray: 10 22; animation-duration: 1.2s; }
@keyframes flow { from { stroke-dashoffset: 158; } to { stroke-dashoffset: 0; } }

.chip-isl { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.28); background: rgba(5,12,28,.78); color: #fff; font: inherit; text-align: left; cursor: pointer; backdrop-filter: blur(10px); box-shadow: 0 12px 30px rgba(0,0,0,.35); transform: translate(-50%, 0) scale(calc(.5 / var(--k))); transform-origin: 50% 0; transition: opacity .4s, border-color .2s, box-shadow .25s; white-space: nowrap; }
.chip-isl:hover, .chip-isl:focus-visible, .chip-isl.is-on { border-color: rgba(127,227,255,.9); box-shadow: 0 14px 36px rgba(0,0,0,.42), 0 0 0 4px rgba(104,232,255,.18); }
.chip-isl.is-dim, .scene.is-zoomed .chip-isl { opacity: 0; pointer-events: none; }
.ci-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--slate); }
.hs-run .ci-dot { background: var(--cyan); animation: ping 1.8s ease-out infinite; }
.hs-ok .ci-dot { background: var(--green); } .hs-warn .ci-dot { background: var(--gold); } .hs-err .ci-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255,110,130,.28); }
.hs-err { border-color: rgba(255,110,130,.7); background: rgba(40,8,18,.84); }
.ci-code { display: none; font: 800 12px var(--f-display); }
.ci-body b { display: block; font-size: 13px; line-height: 1.3; }
.ci-body small { display: block; font-size: 11.5px; color: #c4d1e4; }
.chip-isl .ci-body small { display: none; }
.chip-isl { padding: 7px 11px 7px 9px; gap: 7px; }
.chip-isl .ci-body b { font-size: 12px; }
.scene-world.anim .chip-isl { transition: opacity .4s, border-color .2s, box-shadow .25s, transform .9s cubic-bezier(.22, .9, .24, 1); }

.scene-hud { position: absolute; z-index: 4; left: 18px; right: 18px; top: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.scene-hud > * { pointer-events: auto; }
.hud-time { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-radius: 14px; background: rgba(5,12,28,.7); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); font-size: 13px; color: #c4d1e4; }
.hud-time b { color: #fff; font-weight: 600; }
.scene-modebox { position: absolute; z-index: 4; right: 18px; top: 16px; }
.scene.is-zoomed .scene-modebox { z-index: 7; }
.scene-mode { background: rgba(5,12,28,.7); border-color: rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.scene-back { position: absolute; z-index: 5; left: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 10px; border-radius: 13px; border: 1px solid rgba(255,255,255,.22); background: rgba(5,12,28,.8); color: #fff; font-weight: 600; cursor: pointer; backdrop-filter: blur(10px); }
.scene-hint { position: absolute; z-index: 4; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 7px 14px; border-radius: 99px; background: rgba(5,12,28,.62); color: #c4d1e4; font-size: 12.5px; white-space: nowrap; backdrop-filter: blur(8px); pointer-events: none; }
.scene-panel { position: absolute; z-index: 6; right: 18px; top: 72px; bottom: 18px; width: min(360px, 42%); overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: rgba(7,16,34,.86); border: 1px solid rgba(160,200,255,.22); backdrop-filter: blur(16px); box-shadow: 0 24px 60px rgba(0,0,0,.45); animation: panelIn .55s .25s cubic-bezier(.22,.9,.24,1) both; outline: none; }
@keyframes panelIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.sp-head { display: flex; align-items: center; gap: 12px; }
.sp-head > div { flex: 1; min-width: 0; }
.sp-head b { display: block; font: 800 17px/1.25 var(--f-display); }
.sp-head small { color: var(--dim); font-size: 12.5px; }
.sp-wf { padding: 12px 13px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 7px; }
.sp-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.sp-wf small { font-size: 12.5px; color: var(--muted); }
.sp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.sp-actions .btn-primary .ic { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .scene { height: auto; aspect-ratio: 4 / 3.4; border-radius: 20px; }
  .scene.is-zoomed { margin-bottom: 0; }
  .ci-body { display: none; }
  .ci-code { display: block; }
  .chip-isl { padding: 6px 10px 6px 8px; gap: 6px; border-radius: 11px; }
  .chip-isl.is-on .ci-body { display: block; }
  .scene-hud { left: 10px; right: 10px; top: 10px; }
  .hud-time { font-size: 12px; padding: 6px 10px; }
  .hud-time .tag-mock { display: none; }
  .scene-mode .seg { padding: 0 9px; font-size: 12px; height: 28px; }
  .scene-hint { display: none; }
  .scene-modebox { top: auto; right: 10px; bottom: 10px; }
  .scene-back { left: 10px; bottom: 10px; height: 36px; }
  .scene-panel { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62vh; border-radius: 22px 22px 0 0; z-index: 45; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); animation-name: sheetUp; }
  @keyframes sheetUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .scene-world.anim, .scene-world.anim .chip-isl { transition: none; } .bridge-flow, .isl-glow, .scene-lights i, .scene-clouds i { animation: none; } }
.sp-err { padding: 11px 13px; border-radius: 14px; border: 1px solid rgba(255,200,93,.3); background: rgba(255,200,93,.06); display: grid; gap: 4px; }
.sp-err.sev-err { border-color: rgba(255,110,130,.4); background: rgba(255,110,130,.08); }
.sp-err b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.sp-err b .ic { width: 14px; height: 14px; }
.sp-err.sev-err b { color: var(--red); } .sp-err.sev-warn b { color: var(--gold); } .sp-err.sev-info b { color: var(--cyan); }
.sp-err p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.sp-err small { font-size: 12px; color: var(--dim); }
.sp-err p { color: var(--ink); }
.sp-close { width: 34px; height: 34px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.sp-close .ic { width: 16px; height: 16px; }
.sp-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scene-panel.sp-left { right: auto; left: 18px; animation-name: panelInL; }
@keyframes panelInL { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.scene.panel-left .scene-back { left: auto; right: 18px; }
@media (max-width: 760px) { .scene-panel.sp-left { left: 0; right: 0; animation-name: sheetUp; } .scene.panel-left .scene-back { right: auto; left: 10px; } }

/* ---------- ทีม AI (หุ่นยนต์) ---------- */
.crew { position: absolute; width: 1.75%; aspect-ratio: 40 / 58; padding: 0; border: 0; background: none; cursor: pointer; transform: translate(-50%, -100%); transform-origin: 50% 100%; }
.bot-stack { position: relative; display: block; width: 100%; height: 100%; }
.bot-stack.team-manager { --team: #48c7ff; }
.bot-stack.team-anime { --team: #ff73bd; }
.bot-stack.team-pakdang { --team: #9b78ff; }
.bot-stack.team-finance { --team: #f4b83f; }
.bot-stack.team-horror { --team: #f05b68; }
.bot-stack.team-delivery { --team: #43a4ff; }
.team-shirt { fill: var(--team, #48c7ff); stroke: rgba(255,255,255,.78); stroke-width: .55; opacity: .96; filter: drop-shadow(0 1px 1px rgba(0,0,0,.24)); }
.crew .bot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; transition: opacity .16s, transform .25s; }
.crew .bot-back { opacity: 0; }
.crew:hover .bot-stack, .crew:focus-visible .bot-stack { transform: translateY(-8%) scale(1.08); }
.crew.st-working { animation: room-route var(--speed) linear var(--delay) infinite; will-change: transform; }
.crew.st-working .bot-stack { animation: work-step .56s ease-in-out var(--delay) infinite; }
.crew.st-working .bot-front { animation: face-front var(--speed) steps(1, end) var(--delay) infinite; }
.crew.st-working .bot-back { animation: face-back var(--speed) steps(1, end) var(--delay) infinite; }
.crew.st-ready { animation: room-route calc(var(--speed) + 7s) ease-in-out var(--delay) infinite; will-change: transform; }
.crew.st-ready.guest-roaming { animation: none; }
.crew.st-ready.guest-roaming .crew-name { border-color: rgba(104,232,255,.58); }
.crew.st-ready .bot-stack { animation: work-step .9s ease-in-out var(--delay) infinite; }
.crew.st-ready .bot-front { animation: face-front calc(var(--speed) + 7s) steps(1, end) var(--delay) infinite; }
.crew.st-ready .bot-back { animation: face-back calc(var(--speed) + 7s) steps(1, end) var(--delay) infinite; }
.crew.st-warning .bot-stack { animation: inspect 1.8s ease-in-out var(--delay) infinite; }
.crew.st-stuck .bot-stack { animation: stuck-shake .72s steps(2, end) var(--delay) infinite; }
@keyframes patrol-a { 0%,9%,100% { transform: translate(-50%,-100%) translate(0,0); } 27%,39% { transform: translate(-50%,-100%) translate(28px,-8px); } 57%,69% { transform: translate(-50%,-100%) translate(40px,7px); } 87% { transform: translate(-50%,-100%) translate(16px,12px); } }
@keyframes patrol-b { 0%,10%,100% { transform: translate(-50%,-100%) translate(0,0); } 28%,41% { transform: translate(-50%,-100%) translate(-27px,8px); } 59%,71% { transform: translate(-50%,-100%) translate(-40px,-8px); } 88% { transform: translate(-50%,-100%) translate(-15px,-5px); } }
@keyframes patrol-c { 0%,8%,100% { transform: translate(-50%,-100%) translate(0,0); } 25%,38% { transform: translate(-50%,-100%) translate(18px,-18px); } 56%,69% { transform: translate(-50%,-100%) translate(-20px,-15px); } 86% { transform: translate(-50%,-100%) translate(-31px,8px); } }
@keyframes patrol-d { 0%,11%,100% { transform: translate(-50%,-100%) translate(0,0); } 29%,42% { transform: translate(-50%,-100%) translate(4px,-22px); } 60%,72% { transform: translate(-50%,-100%) translate(31px,-13px); } 89% { transform: translate(-50%,-100%) translate(19px,9px); } }
@keyframes roam-a { 0%,14%,100% { transform: translate(-50%,-100%) translate(0,0); } 32%,46% { transform: translate(-50%,-100%) translate(17px,-5px); } 64%,78% { transform: translate(-50%,-100%) translate(25px,5px); } 92% { transform: translate(-50%,-100%) translate(9px,8px); } }
@keyframes roam-b { 0%,15%,100% { transform: translate(-50%,-100%) translate(0,0); } 33%,47% { transform: translate(-50%,-100%) translate(-16px,6px); } 65%,79% { transform: translate(-50%,-100%) translate(-24px,-6px); } 92% { transform: translate(-50%,-100%) translate(-8px,-4px); } }
@keyframes roam-c { 0%,13%,100% { transform: translate(-50%,-100%) translate(0,0); } 31%,45% { transform: translate(-50%,-100%) translate(11px,-12px); } 63%,77% { transform: translate(-50%,-100%) translate(-13px,-10px); } 91% { transform: translate(-50%,-100%) translate(-20px,5px); } }
@keyframes roam-d { 0%,15%,100% { transform: translate(-50%,-100%) translate(0,0); } 33%,47% { transform: translate(-50%,-100%) translate(3px,-15px); } 65%,79% { transform: translate(-50%,-100%) translate(20px,-9px); } 93% { transform: translate(-50%,-100%) translate(12px,6px); } }
@keyframes room-route { 0%,12%,100% { transform: translate(-50%,-100%) translate(0,0); } 30%,44% { transform: translate(-50%,-100%) translate(var(--rx1),var(--ry1)); } 62%,76% { transform: translate(-50%,-100%) translate(var(--rx2),var(--ry2)); } 90% { transform: translate(-50%,-100%) translate(var(--rx3),var(--ry3)); } }
@keyframes work-step { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7%) rotate(2deg); } }
@keyframes face-front { 0%,7%,44%,100% { opacity: 1; } 8%,43% { opacity: 0; } }
@keyframes face-back { 0%,7%,44%,100% { opacity: 0; } 8%,43% { opacity: 1; } }
@keyframes idle-look { 0%,70%,100% { transform: translateY(0) rotate(0); } 78% { transform: translateY(-2%) rotate(-4deg); } 88% { transform: translateY(-2%) rotate(4deg); } }
@keyframes inspect { 0%,100% { transform: rotate(0) translateY(0); } 35% { transform: rotate(-5deg) translateY(-3%); } 70% { transform: rotate(5deg) translateY(-3%); } }
@keyframes stuck-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5%); } 75% { transform: translateX(5%); } }
.crew-name { position: absolute; left: 50%; bottom: 104%; display: flex; align-items: center; gap: 4px; max-width: 104px; padding: 4px 7px 4px 4px; border-radius: 999px; color: #ecf8ff; background: rgba(5,18,36,.9); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 5px 16px rgba(0,0,0,.3); font: 700 10px/1 var(--f-body); white-space: nowrap; transform: translateX(-50%) scale(calc(.82 / var(--k))); transform-origin: 50% 100%; pointer-events: none; }
.crew-name b { display: grid; place-items: center; flex: none; width: 17px; height: 17px; border-radius: 50%; color: #04101d; background: #73e9ff; font: 800 9px/1 var(--f-display); }
.st-working .crew-name { border-color: rgba(104,232,255,.72); }
.st-working .crew-name b { background: #68e8ff; box-shadow: 0 0 8px rgba(104,232,255,.7); }
.st-ready .crew-name { opacity: .82; }
.st-warning .crew-name { border-color: rgba(255,191,60,.72); }
.st-warning .crew-name b { background: #ffbf3c; }
.st-stuck .crew-name { border-color: rgba(255,59,85,.8); }
.st-stuck .crew-name b { color: #fff; background: #e33b58; }
.st-offline .crew-name { opacity: .55; }
.crew-action { position: absolute; left: 72%; top: -24%; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 8px 8px 8px 2px; display: grid; place-items: center; color: #dffcff; background: rgba(5,18,36,.92); border: 1px solid rgba(95,224,255,.52); box-shadow: 0 5px 14px rgba(0,0,0,.28); font: 800 10px/1 var(--f-mono); transform: scale(calc(1 / var(--k))); transform-origin: 0 100%; opacity: .72; }
.st-working .crew-action { animation: action-pop 1.4s ease-in-out var(--delay) infinite; color: #68e8ff; }
.st-ready .crew-action { opacity: .38; animation: idle-dots var(--speed) ease-in-out var(--delay) infinite; }
.st-warning .crew-action { color: #ffd36e; border-color: rgba(255,191,60,.65); animation: action-pop 1.1s ease-in-out var(--delay) infinite; }
.st-stuck .crew-action { color: #fff; background: #d92d49; border-color: #ff8397; animation: action-pop .7s ease-in-out var(--delay) infinite; }
.st-offline .crew-action { opacity: .25; }
@keyframes action-pop { 0%,100% { opacity: .48; } 50% { opacity: 1; } }
@keyframes idle-dots { 0%,72%,100% { opacity: .25; } 82% { opacity: .65; } }
.led { stroke: rgba(255,255,255,.85); stroke-width: .8; }
.led-work, .led-ready { fill: #3fe08f; }
.led-work { filter: drop-shadow(0 0 2.5px #3fe08f) drop-shadow(0 0 5px #3fe08f); animation: ledPulse 1.2s ease-in-out infinite; }
.led-ready { filter: drop-shadow(0 0 2px #3fe08f); }
.led-warn { fill: #ffbf3c; filter: drop-shadow(0 0 3px #ffbf3c) drop-shadow(0 0 6px #ffbf3c); }
.led-stuck { fill: #ff3b55; filter: drop-shadow(0 0 3px #ff3b55) drop-shadow(0 0 7px #ff3b55); animation: ledPulse .8s ease-in-out infinite; }
.led-off { fill: #6b7487; }
@keyframes ledPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.crew-alert { position: absolute; left: 50%; top: -38%; transform: translateX(-50%) scale(calc(1 / var(--k))); transform-origin: 50% 100%; min-width: 1.3em; height: 1.3em; padding: 0 .3em; border-radius: 99px; background: #ff3b55; color: #fff; font: 800 12px/1.3em var(--f-display); text-align: center; box-shadow: 0 0 0 3px rgba(255,59,85,.3); animation: ledPulse .8s ease-in-out infinite; }
.crew::after { content: attr(data-tip); position: absolute; left: 50%; bottom: 154%; transform: translateX(-50%) scale(calc(1 / var(--k))); transform-origin: 50% 100%; white-space: nowrap; padding: 6px 10px; border-radius: 10px; background: rgba(5,12,28,.92); color: #fff; font: 600 12px/1.3 var(--f-body); border: 1px solid rgba(255,255,255,.2); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 50; }
.crew:hover::after, .crew:focus-visible::after { opacity: 1; }
.crew.st-stuck::after { border-color: rgba(255,59,85,.7); }
.ci-crew { color: #9fe9c4 !important; }
.hs-err .ci-crew { color: #ffb3bf !important; }

.team { display: grid; gap: 8px; }
.team-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.team-head b { font-size: 14px; } .team-head small { font-size: 12.5px; color: var(--dim); }
.team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scene-panel .team ul { max-height: none; }
.card .team ul { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tm { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tm.st-stuck { border-color: rgba(255,59,85,.5); background: rgba(255,59,85,.08); }
.tm.st-warning { border-color: rgba(255,191,60,.4); }
.bot-s { width: 28px; height: 40px; overflow: visible; }
.tm .bot-front { position: static; width: 28px; height: 40px; }
.tm .bot-back { display: none; }
.tm b { display: block; font-size: 13.5px; font-weight: 600; }
.tm small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-model { font: 500 11px var(--f-mono); color: var(--dim); }
.tm-st { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tm-st.t-ok { color: var(--green); } .tm-st.t-warn { color: var(--gold); } .tm-st.t-err { color: var(--red); } .tm-st.t-off { color: var(--dim); }
@media (max-width: 760px) { .crew { width: 2.6%; } .crew::after { display: none; } .crew-name { font-size: 9px; padding-right: 6px; } }
@media (prefers-reduced-motion: reduce) { .crew, .crew .bot, .crew .bot-stack, .crew-action, .led-work, .led-stuck, .crew-alert, .office-status.is-on i { animation: none; } .crew .bot-front { opacity: 1; } .crew .bot-back { opacity: 0; } }
.chip-isl { z-index: 1000; }
.scene-hint .lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: 0; }
.lg-ok { background: #3fe08f; box-shadow: 0 0 6px #3fe08f; } .lg-warn { background: #ffbf3c; box-shadow: 0 0 6px #ffbf3c; } .lg-err { background: #ff3b55; box-shadow: 0 0 6px #ff3b55; }
/* กลางคืน: หรี่ตัวหุ่นยนต์ให้กลมกลืนกับภาพ แต่ไฟที่อกยังสว่าง */
.scene .crew .bot use { transition: filter 1.4s ease; }
.scene.is-night .crew .bot use { filter: brightness(.66) saturate(1.1) hue-rotate(-8deg); }

/* ---------- ออฟฟิศลูกค้า ---------- */
.office-hq { display: flex; justify-content: space-between; gap: 24px; align-items: end; padding: 24px 26px; margin-bottom: 18px; border: 1px solid rgba(104,232,255,.22); border-radius: 22px; background: linear-gradient(125deg, rgba(12,39,67,.95), rgba(25,17,57,.92)); }
.office-hq h2 { margin: 3px 0 5px; font: 800 clamp(24px,3vw,36px)/1.15 var(--f-display); }
.office-hq p { margin: 0; color: var(--muted); }
.office-total { flex: none; padding: 10px 15px; border-radius: 14px; color: var(--muted); background: rgba(4,14,28,.48); border: 1px solid var(--line-2); }
.office-total b { margin-right: 4px; color: #fff; font: 800 24px var(--f-display); }
.office-directory { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.office-card { --office:#68e8ff; display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 15px; padding: 19px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); background: linear-gradient(145deg, rgba(14,27,49,.98), rgba(8,16,32,.98)); text-decoration: none; transition: transform .2s,border-color .2s,box-shadow .2s; }
.office-card.is-connected { border-color: rgba(72,232,147,.38); box-shadow: inset 0 0 0 1px rgba(72,232,147,.06), 0 0 24px rgba(72,232,147,.06); }
.office-card:hover,.office-card:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb,var(--office) 65%,transparent); box-shadow: 0 18px 42px rgba(0,0,0,.28); }
.office-pink { --office:#ff73bd; }.office-violet { --office:#9b78ff; }.office-gold { --office:#f4b83f; }.office-red { --office:#f05b68; }
.office-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: #06111f; background: var(--office); font: 900 15px var(--f-display); box-shadow: 0 8px 26px color-mix(in srgb,var(--office) 25%,transparent); }
img.office-mark { object-fit: cover; border: 2px solid color-mix(in srgb,var(--office) 65%,white); }
.office-main { min-width: 0; }
.office-status-row { min-height: 24px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.office-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid rgba(124,145,170,.24); border-radius: 999px; color: var(--muted); background: rgba(83,100,124,.1); font-size: 11.5px; font-weight: 700; }
.office-status i { width: 7px; height: 7px; border-radius: 50%; background: #718093; }
.office-status.is-on { color: #aaf8cc; border-color: rgba(72,232,147,.38); background: rgba(72,232,147,.1); }
.office-status.is-on i { background: var(--green); box-shadow: 0 0 10px var(--green); animation: ledPulse 1.8s ease-in-out infinite; }
.office-alert,.office-activity { font-size: 11px; font-weight: 700; }
.office-alert { color: #ffc46b; }
.office-activity { color: #86ddff; }
.office-card h3 { margin: 5px 0 2px; font: 800 18px var(--f-display); }
.office-card p { margin: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11.5px; }
.office-meta span:last-child { margin-left: auto; color: var(--office); }
.office-meta .ic { width: 12px; height: 12px; vertical-align: -2px; }
.office-create-card { margin-bottom: 20px; }
.office-create-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.office-create-form .btn { min-height: 45px; }
.office-back { color: #8cecff; text-decoration: none; }
.office-back:hover { text-decoration: underline; }
.client-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 18px; margin-bottom: 7px; border: 1px solid rgba(104,232,255,.26); border-radius: 20px; background: linear-gradient(125deg, rgba(14,42,70,.96), rgba(21,16,55,.94)); box-shadow: 0 16px 42px rgba(0,0,0,.2); overflow: hidden; position: relative; }
.client-hero::after { content: ''; position: absolute; width: 280px; height: 280px; right: 12%; top: -190px; border-radius: 50%; background: rgba(104,232,255,.2); filter: blur(14px); }
.client-brand { display: flex; gap: 12px; align-items: center; position: relative; z-index: 1; }
.client-logo { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; color: #06111f; background: linear-gradient(135deg, #d8fbff, #63ddff); font: 900 17px var(--f-display); box-shadow: 0 9px 22px rgba(104,232,255,.2); }
img.client-logo { object-fit: cover; border: 2px solid rgba(255,255,255,.7); }
.client-brand h2 { margin: 2px 0 5px; font: 800 clamp(22px,3vw,34px)/1.1 var(--f-display); }
.client-brand p { margin: 0; color: var(--muted); }
.client-brand .eyebrow { color: #8cecff; font-size: 11px; letter-spacing: .11em; }
.client-safe { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 8px; max-width: 330px; padding: 8px 11px; border: 1px solid rgba(63,224,143,.25); border-radius: 12px; background: rgba(4,18,31,.48); }
.client-safe .dot { margin-top: 6px; flex: none; }
.client-safe b,.client-safe small { display: block; }
.client-safe small { margin-top: 2px; color: var(--muted); line-height: 1.45; }
.account-chip{display:flex;align-items:center;gap:8px;padding:5px 7px 5px 5px;border:1px solid var(--line);border-radius:13px;background:rgba(7,18,34,.78)}.account-chip>i{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;color:#04121e;background:linear-gradient(135deg,#8ff4ff,#6ea0ff);font-style:normal;font-weight:900}.account-chip span{display:grid;min-width:0}.account-chip b{max-width:120px;overflow:hidden;text-overflow:ellipsis;font-size:10px;white-space:nowrap}.account-chip small{color:var(--dim);font-size:8px}.account-chip button{border:0;color:#a9c5dd;background:transparent;font:700 9px var(--f-body);cursor:pointer}.account-chip button:hover{color:#fff}
.auth-shell{max-width:1180px;margin:34px auto;display:grid;grid-template-columns:minmax(260px,.75fr) minmax(520px,1.25fr);gap:24px;padding:26px;border:1px solid rgba(104,232,255,.22);border-radius:28px;background:linear-gradient(135deg,rgba(13,40,67,.96),rgba(24,15,54,.95));box-shadow:0 30px 90px rgba(0,0,0,.34);overflow:hidden}.auth-intro{align-self:center;padding:22px}.auth-intro h2{margin:8px 0 12px;font:800 clamp(30px,4vw,54px)/1.02 var(--f-display)}.auth-intro>p:not(.eyebrow){color:var(--muted);line-height:1.7}.auth-points{display:grid;gap:10px;margin-top:24px}.auth-points span{display:flex;align-items:center;gap:8px;color:#cce5f3;font-size:12px}.auth-points .ic{width:16px;height:16px;color:var(--green)}.auth-access{display:grid;gap:12px}.auth-google-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:13px;padding:16px;border:1px solid rgba(104,232,255,.28);border-radius:18px;background:linear-gradient(135deg,rgba(104,232,255,.085),rgba(153,111,255,.07));box-shadow:0 15px 35px rgba(0,0,0,.16)}.google-mark{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;color:#4285f4;background:#fff;font:900 22px Arial,sans-serif}.auth-google-card b,.auth-google-card small{display:block}.auth-google-card small{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.45}.btn-google{border-color:rgba(255,255,255,.72);color:#162033;background:#fff;box-shadow:0 8px 22px rgba(0,0,0,.18)}.btn-google:hover{filter:brightness(.96)}.auth-divider{display:flex;align-items:center;gap:10px;color:var(--dim);font-size:9px}.auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:var(--line)}.auth-divider span{white-space:nowrap}.auth-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.auth-card{display:grid;align-content:start;gap:12px;padding:22px;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:rgba(4,15,29,.58);backdrop-filter:blur(12px)}.auth-card h3{margin:0 0 3px;font:800 22px var(--f-display)}.auth-card .btn{margin-top:4px;justify-content:center}.auth-error{grid-column:1/-1;margin:0;padding:12px 15px;border:1px solid rgba(255,82,112,.35);border-radius:13px;color:#ffc3cd;background:rgba(94,12,35,.35)}
/* ห้องออฟฟิศลูกค้า 10 สไตล์ — ใช้โครงเดียวกัน เปลี่ยนบรรยากาศและชุดหุ่นตามธีม */
.client-room { --room:#5ee7ff; --room2:#526dff; --wall1:#122d4a; --wall2:#091426; --floor:#142944; position:relative; margin-bottom: 18px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--room) 28%,transparent); border-radius: 22px; background: #091426; box-shadow: 0 24px 65px rgba(0,0,0,.26); }
.room-toolbar { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:18px 20px; background:linear-gradient(110deg,color-mix(in srgb,var(--wall1) 92%,black),var(--wall2)); border-bottom:1px solid rgba(255,255,255,.08); }
.room-toolbar h2 { margin:2px 0 3px; font:800 22px var(--f-display); }.room-toolbar p { margin:0; color:var(--muted); font-size:12px; }
.room-canvas { position:relative; container-type:inline-size; aspect-ratio:1672/941; min-height:0; overflow:hidden; isolation:isolate; background:var(--atmo,linear-gradient(transparent,transparent)),url('assets/client-office-sky-v2.webp') center/cover no-repeat; background-blend-mode:var(--scene-blend,normal),normal; transition:background .45s ease; }
.room-canvas::before { content:''; position:absolute; z-index:1; inset:0; pointer-events:none; background:var(--scene-light,linear-gradient(180deg,color-mix(in srgb,var(--room2) 9%,transparent),transparent 48%,color-mix(in srgb,var(--wall2) 14%,transparent))); mix-blend-mode:var(--light-blend,color); transition:background .45s ease,opacity .45s ease; }
.room-canvas::after { content:''; position:absolute; z-index:2; inset:0; pointer-events:none; opacity:.55; background:radial-gradient(circle at 7% 64%,#77f6ff 0 2px,transparent 3px),radial-gradient(circle at 20% 31%,#ffe3a2 0 2px,transparent 3px),radial-gradient(circle at 39% 18%,#75efff 0 2px,transparent 3px),radial-gradient(circle at 50% 56%,#5ff5ff 0 4px,transparent 8px),radial-gradient(circle at 73% 49%,#ffe199 0 2px,transparent 3px),radial-gradient(circle at 89% 32%,#62eaff 0 2px,transparent 3px),radial-gradient(circle at 94% 67%,#ffe1a0 0 2px,transparent 3px); filter:drop-shadow(0 0 6px var(--room)); animation:officeLights 3.8s steps(1,end) infinite; }
.room-picker-trigger{position:absolute;z-index:20;left:50%;bottom:14px;transform:translateX(-50%);display:flex;align-items:center;gap:7px;padding:9px 13px;border:1px solid rgba(255,255,255,.52);border-radius:999px;color:#fff;background:rgba(3,14,28,.82);backdrop-filter:blur(14px);box-shadow:0 10px 30px rgba(0,0,0,.34),0 0 20px color-mix(in srgb,var(--room) 22%,transparent);font:700 11px var(--f-body);cursor:pointer}.room-picker-trigger span{color:var(--room);font-size:14px}.room-picker-trigger small{padding:2px 6px;border-radius:999px;color:#06111f;background:var(--room);font-size:8px}.room-picker-trigger:hover{border-color:var(--room);transform:translateX(-50%) translateY(-2px)}
.room-window { display:none; }
.room-window i { border-right:2px solid rgba(15,45,75,.34); }.room-window i:last-child { border:0; }
.room-light { display:none; }
.room-ambience{position:absolute;z-index:3;inset:0;pointer-events:none;overflow:hidden}.room-ambience i{position:absolute;display:block;opacity:var(--decor-opacity,.28);filter:drop-shadow(0 0 9px var(--room));animation:ambienceFloat 7s ease-in-out infinite}.room-ambience i:nth-child(1){left:8%;top:18%;width:5px;height:5px;border-radius:50%;background:var(--room)}.room-ambience i:nth-child(2){right:9%;top:24%;width:7px;height:7px;border-radius:50%;background:var(--room2);animation-delay:-2.5s}.room-ambience i:nth-child(3){left:50%;bottom:15%;width:4px;height:4px;border-radius:50%;background:#fff;animation-delay:-4s}
.room-sign { position:absolute; z-index:5; right:2.2%; top:3%; display:grid; grid-template-columns:42px auto; column-gap:10px; align-items:center; padding:9px 12px; border:1px solid rgba(255,255,255,.42); border-radius:13px; background:rgba(5,18,34,.68); backdrop-filter:blur(12px); box-shadow:0 10px 28px rgba(0,0,0,.24); }
.room-sign .room-logo { grid-row:1/3; width:42px; height:42px; border-radius:12px; }.room-sign b,.room-sign small{display:block}.room-sign small{color:var(--room);font-size:8px;letter-spacing:.12em}
.room-screen { position:absolute; z-index:5; left:2.2%; top:3%; width:auto; min-width:128px; padding:9px 12px; border:1px solid rgba(255,255,255,.42); border-radius:12px; background:rgba(2,14,29,.7); backdrop-filter:blur(12px); box-shadow:0 10px 28px rgba(0,0,0,.24); }.room-screen span,.room-screen small{display:block;color:#d2e4f4;font-size:9px}.room-screen b{font:800 22px var(--f-display);color:var(--room)}
.room-desk { display:none; }.desk-a{display:none}.desk-b{display:none}
.room-desk::before,.room-desk::after { content:''; position:absolute; top:-24px; width:36%; height:24px; border:3px solid #233d54; border-radius:5px; background:linear-gradient(135deg,#0b2038,var(--room2)); box-shadow:0 0 12px color-mix(in srgb,var(--room) 25%,transparent); }.room-desk::before{left:8%}.room-desk::after{right:8%}
.room-plant { display:none; }
.room-crew { position:absolute; z-index:4; inset:0; }.room-agent { position:absolute; z-index:4; width:72px; text-align:center; color:#fff; animation:roomBob 3s ease-in-out infinite; will-change:transform; }.room-agent .bot-stack{position:relative;z-index:2;width:40px;height:58px;margin:auto}.room-agent .bot{position:absolute;inset:0;width:40px;height:58px}.room-agent .bot-back{display:block;opacity:0}.room-agent small{display:block;margin-top:-4px;color:#eef7ff;font-size:9px;text-shadow:0 1px 4px #001}.room-agent-label{position:relative;z-index:3;display:block;margin-bottom:-4px;padding:3px 5px;border-radius:8px;background:rgba(4,12,24,.78);font-size:9px;white-space:nowrap;box-shadow:0 4px 10px rgba(0,0,0,.24)}.room-agent-label b{margin-right:3px;color:var(--room)}.room-desk-tag{position:absolute;z-index:3;left:50%;bottom:-11px;transform:translateX(-50%);min-width:46px;padding:2px 7px;border:1px solid color-mix(in srgb,var(--room) 48%,transparent);border-radius:999px;color:#dffbff;background:rgba(3,14,28,.8);font-size:8px;white-space:nowrap;opacity:0;box-shadow:0 0 12px color-mix(in srgb,var(--room) 25%,transparent)}
.room-agent .team-shirt { fill:var(--room)!important; }.room-agent:nth-child(even) .team-shirt{fill:var(--room2)!important}
/* จุดประจำโต๊ะ A–F ตามเฟอร์นิเจอร์จริงในภาพห้อง
   ตอนทำงานหุ่นจะอยู่ตรงจุดฐานนี้ ส่วนตอนว่างจึงค่อยเดินออกทางโล่งและกลับโต๊ะเดิม */
.agent-1{left:25.5%;top:16%;--x1:1cqw;--y1:3cqw;--x2:3cqw;--y2:6cqw;--x3:5cqw;--y3:8cqw}
.agent-2{left:10.5%;top:37%;--x1:2cqw;--y1:1cqw;--x2:4cqw;--y2:2cqw;--x3:6cqw;--y3:1cqw}
.agent-3{left:34.8%;top:56%;--x1:1cqw;--y1:-2cqw;--x2:3cqw;--y2:-5cqw;--x3:5cqw;--y3:-7cqw}
.agent-4{left:45.5%;top:10.5%;--x1:1cqw;--y1:3cqw;--x2:2cqw;--y2:6cqw;--x3:4cqw;--y3:9cqw}
.agent-5{left:73.2%;top:40%;--x1:-1cqw;--y1:2cqw;--x2:-3cqw;--y2:4cqw;--x3:-5cqw;--y3:5cqw}
.agent-6{left:87.2%;top:28%;--x1:-1cqw;--y1:3cqw;--x2:-3cqw;--y2:6cqw;--x3:-5cqw;--y3:8cqw}
.room-agent.is-ready { animation:roomWander var(--walk-speed) cubic-bezier(.4,0,.2,1) var(--walk-delay) infinite; }
.room-agent.is-ready .bot-stack { animation:roomStep .64s ease-in-out infinite; }
.room-agent.is-ready .bot-front { animation:roomFaceFront var(--walk-speed) steps(1,end) var(--walk-delay) infinite; }
.room-agent.is-ready .bot-back { animation:roomFaceBack var(--walk-speed) steps(1,end) var(--walk-delay) infinite; }
.room-agent.is-working { animation:none; transform:translate(0,0); }
.room-agent.is-working .bot-front { opacity:1; animation:none; }
.room-agent.is-working .bot-back { opacity:0; animation:none; }
.room-agent.is-working::after { content:''; position:absolute; z-index:1; left:50%; bottom:9px; width:54px; height:18px; transform:translateX(-50%); border-radius:50%; background:color-mix(in srgb,var(--room) 20%,transparent); box-shadow:0 0 22px var(--room); animation:holoPulse 1.7s ease-in-out infinite; }
.room-agent.is-working .room-desk-tag { opacity:1; color:#061626; background:var(--room); font-weight:900; box-shadow:0 0 18px color-mix(in srgb,var(--room) 70%,transparent); }
.room-agent.is-working .room-agent-label { border:1px solid color-mix(in srgb,var(--room) 70%,transparent); box-shadow:0 0 16px color-mix(in srgb,var(--room) 40%,transparent); }
.room-agent.is-working .bot-stack { animation:roomWork .9s ease-in-out infinite; }
.room-agent.is-working small { color:#aaffdc; font-weight:800; }
.agent-mode-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 14px;border-top:1px solid color-mix(in srgb,var(--room) 24%,transparent);border-bottom:1px solid color-mix(in srgb,var(--room) 22%,transparent);background:rgba(3,14,28,.72)}.agent-mode-bar b,.agent-mode-bar small{display:block}.agent-mode-bar b{font-size:12px}.agent-mode-bar small{margin-top:2px;color:var(--muted);font-size:9px}.agent-mode-actions{display:flex;gap:5px;padding:4px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.2)}.agent-mode-actions button{padding:7px 11px;border:0;border-radius:8px;color:var(--muted);background:transparent;font:700 10px var(--f-display);cursor:pointer}.agent-mode-actions button.is-selected{color:#06131d;background:var(--room);box-shadow:0 0 15px color-mix(in srgb,var(--room) 38%,transparent)}
.agent-flow-map{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid color-mix(in srgb,var(--room) 18%,transparent);background:rgba(2,10,22,.62)}.agent-flow-map>span{display:flex;align-items:center;gap:5px;padding:5px 8px;border:1px solid color-mix(in srgb,var(--room) 28%,transparent);border-radius:9px;color:#dbeaff;background:rgba(255,255,255,.025);font-size:8.5px;font-weight:700}.agent-flow-map span b{display:grid;place-items:center;width:17px;height:17px;border-radius:6px;color:#06131d;background:var(--room);font:900 8px var(--f-display)}.agent-flow-map i,.agent-flow-map em{color:var(--room);font-style:normal;font-weight:900}.agent-flow-map .agent-mode-actions{width:auto;flex:0 0 auto;margin-left:4px}.agent-flow-map .agent-mode-actions button{flex:none}.agent-flow-map small{flex-basis:100%;color:var(--dim);font-size:8px;text-align:center}
.room-mode-controls{position:absolute;right:14px;bottom:12px;z-index:12;width:auto!important;border-color:color-mix(in srgb,var(--room) 34%,transparent);background:rgba(2,10,22,.82);box-shadow:0 8px 24px rgba(0,0,0,.3)}.room-mode-controls button{flex:none!important}.room-channel-metrics{padding:10px 12px 11px;border-bottom:1px solid color-mix(in srgb,var(--room) 18%,transparent);background:rgba(2,10,22,.72)}.room-channel-metrics .channel-metrics-row{margin:0}.channel-dashboard-summary{padding:12px 18px}
.room-agent-actions{display:flex;justify-content:center;gap:3px;margin-top:4px}.room-agent-actions button{padding:3px 5px;border:1px solid color-mix(in srgb,var(--room) 42%,transparent);border-radius:999px;color:#e9fbff;background:rgba(3,14,28,.88);font:700 7px var(--f-display);white-space:nowrap;cursor:pointer;box-shadow:0 4px 10px rgba(0,0,0,.25)}.room-agent-actions button:first-child{color:var(--room)}.room-agent-actions button:hover,.room-agent-actions button:focus-visible{border-color:var(--room);color:#fff;box-shadow:0 0 12px color-mix(in srgb,var(--room) 44%,transparent)}.room-agent-actions button:disabled{opacity:.55;cursor:wait}
.room-floor-lines { display:block; position:absolute; z-index:3; left:42%; top:43%; width:16%; aspect-ratio:1; border-radius:50%; border:1px solid color-mix(in srgb,var(--room) 48%,transparent); box-shadow:0 0 18px color-mix(in srgb,var(--room) 48%,transparent),inset 0 0 22px color-mix(in srgb,var(--room2) 25%,transparent); animation:holoPulse 2.8s ease-in-out infinite; pointer-events:none; }
@keyframes officeLights{0%,18%,43%,71%,100%{opacity:.2}20%,39%,46%,68%,74%,96%{opacity:.9}}
@keyframes ambienceFloat{50%{opacity:.85;transform:translateY(-12px) scale(1.35)}}
@keyframes holoPulse{50%{opacity:.42;transform:scale(1.08);filter:brightness(1.35)}}
@keyframes roomBob{50%{transform:translateY(-3px)}}
@keyframes roomStep{0%,14%,58%,70%,100%{transform:translateY(0)}34%,82%{transform:translateY(-2px) rotate(-.6deg)}}
@keyframes roomWork{50%{transform:translateY(-2px) scale(1.025)}}
@keyframes roomFaceFront{0%,13%{opacity:1}14%,49%{opacity:0}50%,100%{opacity:1}}
@keyframes roomFaceBack{0%,13%{opacity:0}14%,49%{opacity:1}50%,100%{opacity:0}}
@keyframes roomWander{0%,13%{transform:translate(0,0)}25%{transform:translate(var(--x1),var(--y1))}37%{transform:translate(var(--x2),var(--y2))}49%,61%{transform:translate(var(--x3),var(--y3))}73%{transform:translate(var(--x2),var(--y2))}85%{transform:translate(var(--x1),var(--y1))}97%,100%{transform:translate(0,0)}}
.room-picker{position:absolute;z-index:50;inset:72px 14px 14px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;padding:14px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:rgba(3,12,24,.94);backdrop-filter:blur(18px);box-shadow:0 24px 70px rgba(0,0,0,.5);animation:roomPickerIn .2s ease-out}.room-picker[hidden]{display:none}.room-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.room-picker-head b,.room-picker-head small{display:block}.room-picker-head b{font:800 15px var(--f-display)}.room-picker-head small{margin-top:2px;color:var(--muted);font-size:9px}.room-picker-head button{width:32px;height:32px;border:1px solid var(--line-2);border-radius:10px;color:#fff;background:rgba(255,255,255,.06);font-size:20px;cursor:pointer}.room-picker-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;min-height:0;overflow:auto}.room-choice{--room:#5ee7ff;--room2:#526dff;display:grid;grid-template-columns:58px minmax(0,1fr);gap:8px;padding:8px;border:1px solid var(--line);border-radius:13px;color:var(--ink);background:#0b1728;text-align:left;cursor:pointer;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}.room-choice:hover{transform:translateY(-2px)}.room-choice:hover,.room-choice.is-selected{border-color:var(--room);box-shadow:0 0 0 2px color-mix(in srgb,var(--room) 14%,transparent)}.room-choice-copy{align-self:center;min-width:0}.room-choice b,.room-choice small{display:block}.room-choice b{font-size:10.5px}.room-choice small{margin-top:2px;color:var(--dim);font-size:8px;line-height:1.25}.room-choice strong{grid-column:1/-1;color:var(--room);font-size:8px;text-align:right}.room-swatch{grid-row:1;height:48px;border-radius:9px;background:linear-gradient(135deg,var(--wall1),var(--room2));position:relative;overflow:hidden;display:grid;place-items:center}.room-swatch em{position:relative;z-index:2;color:#fff;font:900 14px var(--f-display);font-style:normal;text-shadow:0 0 10px var(--room)}.room-swatch i{position:absolute;left:10%;right:10%;bottom:6px;height:4px;border-radius:5px;background:var(--room);box-shadow:0 0 10px var(--room)}
.agent-config-dock{--room:#68e8ff;margin:-4px 0 18px;padding:14px;border:1px solid color-mix(in srgb,var(--room) 38%,transparent);border-radius:20px;background:linear-gradient(145deg,rgba(9,24,43,.98),rgba(7,14,29,.98));box-shadow:0 22px 55px rgba(0,0,0,.3),0 0 28px color-mix(in srgb,var(--room) 8%,transparent);animation:agentDockIn .22s ease-out}.agent-config-dock[hidden],.agent-config-panel[hidden]{display:none}.agent-config-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-bottom:12px}.agent-config-tabs button{display:grid;grid-template-columns:24px minmax(0,1fr);gap:7px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:11px;color:var(--muted);background:rgba(255,255,255,.025);text-align:left;cursor:pointer}.agent-config-tabs button b{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;color:#06131d;background:color-mix(in srgb,var(--room) 72%,white);font:900 10px var(--f-display)}.agent-config-tabs button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:700}.agent-config-tabs button.is-selected{border-color:var(--room);color:#fff;background:color-mix(in srgb,var(--room) 12%,transparent);box-shadow:0 0 16px color-mix(in srgb,var(--room) 15%,transparent)}.agent-config-panel{padding:17px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:rgba(3,13,27,.7)}.agent-config-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:15px}.agent-config-head h3{margin:2px 0 4px;font:800 20px var(--f-display)}.agent-config-head p{margin:0;color:var(--muted);font-size:11px}.agent-config-head .eyebrow{color:var(--room)}.agent-config-close{width:34px;height:34px;border:1px solid var(--line-2);border-radius:10px;color:#fff;background:rgba(255,255,255,.05);font-size:21px;cursor:pointer}.agent-config-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.agent-config-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px;padding-top:13px;border-top:1px solid var(--line)}.agent-config-foot span{color:#9cf4c4;font-size:10px}.agent-config-foot .ic{width:12px;height:12px;vertical-align:-2px}.agent-readonly{display:grid;gap:4px;padding:12px;border:1px solid var(--line-2);border-radius:12px;background:rgba(255,255,255,.03)}.agent-readonly span{color:var(--muted);font-size:10px}.agent-readonly b{font-size:12px}.agent-readonly small{color:var(--dim);font-size:9px}.agent-youtube-state{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.025)}.agent-youtube-state i{width:10px;height:10px;border-radius:50%;background:#718093;box-shadow:0 0 8px rgba(113,128,147,.5)}.agent-youtube-state.is-on i{background:var(--green);box-shadow:0 0 11px var(--green)}.agent-youtube-state b,.agent-youtube-state small{display:block}.agent-youtube-state small{margin-top:2px;color:var(--dim);font-size:10px}.agent-publish-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.agent-publish-options label{display:flex;gap:8px;align-items:flex-start;padding:10px;border:1px solid var(--line-2);border-radius:11px;background:rgba(255,255,255,.025);cursor:pointer}.agent-publish-options input{margin-top:3px;accent-color:var(--room)}.agent-publish-options b,.agent-publish-options small{display:block}.agent-publish-options b{font-size:10px}.agent-publish-options small{margin-top:2px;color:var(--dim);font-size:8px}@keyframes agentDockIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.agent-requirement{position:fixed;z-index:120;inset:0;display:grid;place-items:center;padding:20px;background:rgba(1,7,17,.72);backdrop-filter:blur(10px)}.agent-requirement[hidden]{display:none}.agent-requirement-card{width:min(610px,100%);display:grid;grid-template-columns:52px minmax(0,1fr);gap:16px;padding:22px;border:1px solid rgba(255,185,77,.5);border-radius:22px;background:linear-gradient(145deg,#162136,#0b1424);box-shadow:0 30px 90px rgba(0,0,0,.65),0 0 32px rgba(255,166,54,.12);animation:agentDockIn .18s ease-out}.agent-requirement-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:17px;color:#1b1000;background:#ffbd59;font:900 26px var(--f-display);box-shadow:0 0 22px rgba(255,189,89,.34)}.agent-requirement-card h3{margin:3px 0 7px;font:800 22px var(--f-display)}.agent-requirement-card p{margin:0;color:var(--muted);line-height:1.55}.agent-requirement-card .eyebrow{color:#ffca78}.agent-requirement-card small{display:block;margin-top:8px;color:#9babc0}.agent-requirement-card .agent-requirement-icon+div{min-width:0}.agent-requirement-card .agent-requirement-icon+div+*{grid-column:1/-1}.agent-requirement-card>.agent-requirement-actions{grid-column:1/-1}.agent-requirement-card .btn{justify-content:center}.agent-requirement-card>div:last-child{grid-column:1/-1}.agent-requirement-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:4px}
@keyframes roomPickerIn{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.room-sky{--room:#5ee7ff;--room2:#526dff;--wall1:#122d4a;--wall2:#091426;--floor:#142944;--atmo:linear-gradient(180deg,rgba(110,220,255,.08),rgba(34,94,178,.06));--scene-light:linear-gradient(180deg,rgba(181,242,255,.08),transparent 52%,rgba(15,47,101,.08));--scene-blend:screen}.room-cyber{--room:#45ffd1;--room2:#9b52ff;--wall1:#10213c;--wall2:#07051c;--floor:#11132d;--atmo:repeating-linear-gradient(90deg,rgba(69,255,209,.06) 0 1px,transparent 1px 72px),linear-gradient(135deg,rgba(15,255,213,.18),rgba(130,28,255,.22));--scene-light:linear-gradient(90deg,rgba(0,255,211,.1),transparent 45%,rgba(158,55,255,.13));--scene-blend:screen}.room-anime{--room:#ff77c7;--room2:#6cdcff;--wall1:#53365d;--wall2:#211c46;--floor:#513b66;--atmo:linear-gradient(135deg,rgba(255,119,199,.24),rgba(108,220,255,.16));--scene-light:radial-gradient(circle at 22% 22%,rgba(255,225,245,.26),transparent 28%),linear-gradient(180deg,rgba(255,175,222,.12),transparent);--scene-blend:soft-light}.room-news{--room:#48a9ff;--room2:#e93d55;--wall1:#152b49;--wall2:#090f1b;--floor:#18253b;--atmo:linear-gradient(105deg,rgba(28,112,255,.2) 0 43%,transparent 43% 57%,rgba(233,61,85,.18) 57%);--scene-light:linear-gradient(180deg,rgba(12,42,82,.08),transparent 46%,rgba(214,22,55,.1));--scene-blend:multiply}.room-gold{--room:#ffd260;--room2:#a86e21;--wall1:#493722;--wall2:#17100b;--floor:#342b24;--atmo:linear-gradient(140deg,rgba(255,207,89,.32),rgba(71,37,0,.16));--scene-light:radial-gradient(circle at 50% 18%,rgba(255,229,143,.28),transparent 42%),linear-gradient(180deg,transparent,rgba(66,35,4,.14));--scene-blend:color}.room-forest{--room:#6ff0a3;--room2:#2b9e74;--wall1:#21483f;--wall2:#0c201e;--floor:#203c34;--atmo:radial-gradient(circle at 18% 15%,rgba(227,255,160,.25),transparent 25%),linear-gradient(135deg,rgba(57,183,102,.24),rgba(5,61,54,.16));--scene-light:linear-gradient(120deg,rgba(224,255,179,.18),transparent 34%),linear-gradient(180deg,transparent,rgba(7,58,41,.12));--scene-blend:color}.room-horror{--room:#ff4d67;--room2:#711334;--wall1:#331328;--wall2:#0b0710;--floor:#22101d;--atmo:radial-gradient(circle at 50% 48%,transparent 22%,rgba(16,0,10,.56) 86%),linear-gradient(135deg,rgba(120,0,28,.26),rgba(0,0,0,.3));--scene-light:linear-gradient(180deg,rgba(85,0,22,.1),transparent 42%,rgba(0,0,0,.4));--scene-blend:multiply;--decor-opacity:.55}.room-loft{--room:#ffb477;--room2:#a55b3d;--wall1:#51382f;--wall2:#211713;--floor:#47342c;--atmo:linear-gradient(145deg,rgba(255,182,113,.3),rgba(83,40,18,.14));--scene-light:radial-gradient(circle at 40% 12%,rgba(255,222,170,.28),transparent 42%),linear-gradient(180deg,transparent,rgba(74,35,14,.14));--scene-blend:soft-light}.room-space{--room:#62edff;--room2:#725cff;--wall1:#162256;--wall2:#05091c;--floor:#111735;--atmo:radial-gradient(circle at 72% 20%,rgba(83,55,255,.3),transparent 26%),linear-gradient(135deg,rgba(4,15,70,.34),rgba(67,20,137,.25));--scene-light:radial-gradient(circle at 50% 52%,rgba(72,239,255,.16),transparent 25%),linear-gradient(180deg,rgba(7,11,55,.12),rgba(1,2,18,.25));--scene-blend:multiply;--decor-opacity:.7}.room-minimal{--room:#d9f5ff;--room2:#8396ac;--wall1:#70869a;--wall2:#33475a;--floor:#53697b;--atmo:linear-gradient(135deg,rgba(255,255,255,.58),rgba(206,227,240,.32));--scene-light:linear-gradient(180deg,rgba(255,255,255,.28),transparent 58%,rgba(198,216,226,.14));--scene-blend:screen;--light-blend:screen}
.youtube-connect { display: grid; grid-template-columns: 66px minmax(0,1fr) auto; gap: 18px; align-items: center; margin-bottom: 18px; padding: 20px 22px; border: 1px solid rgba(255,72,72,.28); border-radius: 20px; background: linear-gradient(125deg,rgba(48,18,29,.92),rgba(13,24,44,.97)); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.youtube-connect.is-connected { border-color: rgba(63,224,143,.3); background: linear-gradient(125deg,rgba(10,48,42,.88),rgba(13,24,44,.97)); }
.youtube-connect-compact { padding:15px 18px; grid-template-columns:48px minmax(0,1fr) auto; }.youtube-connect-compact .youtube-brand { width:46px; height:46px; border-radius:14px; }.youtube-connect-compact .youtube-brand span { border-top-width:7px; border-bottom-width:7px; border-left-width:12px; }.youtube-connect-compact .youtube-copy h2 { font-size:16px; }.youtube-connect-compact .youtube-copy > p { font-size:10px; }.youtube-connect-compact .youtube-action { min-width:170px; }
.youtube-brand { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 19px; background: #ff3030; box-shadow: 0 12px 30px rgba(255,48,48,.25); }
.youtube-brand span { width: 0; height: 0; margin-left: 4px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 15px solid white; }
.youtube-copy h2 { margin: 2px 0 4px; font: 800 21px var(--f-display); }
.youtube-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.youtube-kicker{display:flex;align-items:center;gap:10px;margin-bottom:3px}.youtube-kicker .eyebrow{margin:0}.youtube-status{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid rgba(255,255,255,.13);border-radius:999px;font-size:9px;font-weight:800;letter-spacing:.03em}.youtube-status i{width:7px;height:7px;border-radius:50%}.youtube-status.is-on{border-color:rgba(63,224,143,.38);color:#a9f8ca;background:rgba(63,224,143,.1)}.youtube-status.is-on i{background:var(--green);box-shadow:0 0 10px var(--green)}.youtube-status.is-off{color:#c1ccd8;background:rgba(255,255,255,.05)}.youtube-status.is-off i{background:#718093;box-shadow:0 0 7px rgba(113,128,147,.5)}
.youtube-status.is-warn{border-color:rgba(255,184,0,.45);color:#ffd36b;background:rgba(255,184,0,.1)}.youtube-status.is-warn i{background:#ffb800;box-shadow:0 0 10px rgba(255,184,0,.75)}
.office-youtube{display:inline-flex!important;align-items:center;gap:5px}.office-youtube i{width:7px;height:7px;border-radius:50%;background:#718093}.office-youtube.is-on{color:#9cf4c4}.office-youtube.is-on i{background:var(--green);box-shadow:0 0 9px var(--green)}
.youtube-scope { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--dim); font-size: 11.5px; }
.youtube-scope .ic { width: 12px; height: 12px; color: var(--green); vertical-align: -2px; }
.youtube-action { display: grid; justify-items: end; gap: 7px; }
.youtube-action small { color: var(--dim); font-size: 10.5px; }
.btn-youtube { border-color: #ff4646; color: #fff; background: linear-gradient(135deg,#f52d2d,#c8172c); box-shadow: 0 10px 26px rgba(222,31,49,.22); }
.btn-youtube:hover { filter: brightness(1.08); }
.yt-play { font-size: 11px; }
.connection-pill { display: inline-flex; align-items: center; gap: 7px; color: #9cf4c4; font-weight: 700; }
.connection-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.client-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.8fr); gap: 18px; align-items: start; }
.channel-dashboard { margin:7px 0 14px; padding:22px; overflow:hidden; border:1px solid rgba(104,232,255,.27); border-radius:24px; background:radial-gradient(circle at 88% 4%,rgba(104,232,255,.12),transparent 31%),linear-gradient(145deg,rgba(11,29,52,.98),rgba(7,15,31,.98)); box-shadow:0 20px 55px rgba(0,0,0,.22); }
.client-hero + .channel-dashboard { margin-top:-19px; }
.channel-dashboard + .client-room { margin-top:-24px; }
.channel-dashboard-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }.channel-dashboard-head h2 { margin:3px 0 5px; font:800 22px var(--f-display); }.channel-dashboard-head p { max-width:700px; margin:0; color:var(--muted); }
.channel-data-state { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; padding:8px 12px; border:1px solid var(--line-2); border-radius:999px; color:var(--muted); background:rgba(255,255,255,.035); font-size:10px; font-weight:800; }.channel-data-state i { width:8px; height:8px; border-radius:50%; background:#718093; }.channel-data-state.is-on { color:#9cf4c4; border-color:rgba(95,245,179,.35); background:rgba(95,245,179,.08); }.channel-data-state.is-on i { background:var(--green); box-shadow:0 0 10px var(--green); }
.channel-analytics-warning{margin:12px 0 0;padding:9px 12px;border:1px solid rgba(255,184,0,.35);border-radius:12px;color:#ffd486;background:rgba(255,184,0,.08);font-size:12px;font-weight:700}
.channel-metrics-row { display:grid; grid-template-columns:58px minmax(0,1fr); gap:8px; align-items:stretch; margin:0 0 10px; }
.channel-period-control { display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:5px; min-width:0; }.channel-period-control > small { color:var(--dim); font-size:7px; line-height:1.2; text-align:center; }
.channel-metrics { display:grid; grid-template-columns:repeat(4,minmax(135px,1fr)); gap:8px; min-width:0; margin:0; overflow-x:auto; scrollbar-width:thin; }.channel-metrics article { min-width:0; padding:11px 12px; border:1px solid rgba(255,255,255,.08); border-radius:13px; background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.02)); }.channel-metrics article.is-online { border-color:rgba(95,245,179,.18); }.channel-metrics span,.channel-metrics b,.channel-metrics small { display:block; }.channel-metrics span { color:var(--muted); font-size:10px; }.channel-metrics .channel-metric-label { display:flex; align-items:center; gap:7px; }.channel-metric-label i { width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--green);box-shadow:0 0 9px var(--green); }.channel-metrics b { margin:3px 0; color:#f3f9ff; font:800 19px var(--f-display); }.channel-metrics small { min-height:0; color:var(--dim); font-size:8.5px; line-height:1.35; }.channel-dashboard.has-data .channel-metrics small { color:#9cf4c4; }
.channel-office-summary { display:grid; grid-template-columns:repeat(4,minmax(110px,1fr)); gap:7px; margin-top:10px; padding-top:10px; overflow-x:auto; border-top:1px solid rgba(255,255,255,.08); scrollbar-width:thin; }.channel-office-summary > span { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:110px; padding:7px 10px; border:1px solid rgba(255,255,255,.07); border-radius:11px; background:rgba(255,255,255,.025); }.channel-office-summary small { color:var(--muted); font-size:8.5px; white-space:nowrap; }.channel-office-summary b { color:#fff; font:800 16px var(--f-display); }
.post-calendar-office-summary { margin-top:8px; padding-top:0; border-top:0; }
.channel-chart-card { position:relative; min-height:235px; padding:14px 16px 10px; border:1px solid rgba(104,232,255,.17); border-radius:18px; background:rgba(3,11,25,.6); }.channel-chart-title { display:flex; justify-content:flex-start; gap:12px; align-items:center; flex-wrap:wrap; }.channel-chart-title b,.channel-chart-title small { display:block; }.channel-chart-title small,.channel-chart-title > span { margin-top:3px; color:var(--dim); font-size:10px; }.channel-chart-title > span { margin-left:auto; }.channel-range { display:inline-flex; align-items:center; gap:4px; padding:3px; border:1px solid rgba(104,232,255,.2); border-radius:999px; background:rgba(104,232,255,.045); }.channel-range button { min-width:46px; padding:6px 9px; border:0; border-radius:999px; color:var(--muted); background:transparent; font:800 10px/1 var(--f-display); cursor:pointer; }.channel-range button:hover { color:#dffbff; background:rgba(104,232,255,.1); }.channel-range button.is-selected { color:#061426; background:linear-gradient(135deg,#68e8ff,#a884ff); box-shadow:0 4px 14px rgba(104,232,255,.2); }.channel-chart-svg { display:block; width:100%; height:180px; margin-top:2px; overflow:visible; }.channel-chart-grid line { stroke:rgba(255,255,255,.09); stroke-width:1; }.channel-chart-line { fill:none; stroke:#68e8ff; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 7px rgba(104,232,255,.45)); }.channel-chart-svg text { fill:#7f91a8; font-size:11px; }
.channel-range-vertical { display:flex; flex-direction:column; height:100%; padding:3px; border-radius:14px; }.channel-range-vertical button { min-width:0; flex:1; padding:5px 4px; border-radius:10px; white-space:nowrap; }
.channel-chart-empty { position:absolute; inset:58px 16px 16px; display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:14px; align-items:center; padding:18px; border:1px dashed rgba(104,232,255,.28); border-radius:15px; background:linear-gradient(135deg,rgba(104,232,255,.055),rgba(150,103,255,.05)); }.channel-empty-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; color:#8cecff; background:rgba(104,232,255,.11); font-size:23px; font-weight:900; }.channel-chart-empty b,.channel-chart-empty small { display:block; }.channel-chart-empty small { margin-top:5px; color:var(--muted); line-height:1.5; }
.post-calendar { margin:0 0 14px; padding:18px; border:1px solid rgba(104,232,255,.24); border-radius:22px; background:linear-gradient(145deg,rgba(9,25,46,.98),rgba(7,14,29,.98)); box-shadow:0 18px 45px rgba(0,0,0,.18); }.post-calendar-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }.post-calendar-head .eyebrow { margin:0 0 3px; }.post-calendar-head h2 { margin:0 0 3px; font:800 20px var(--f-display); }.post-calendar-head p:not(.eyebrow) { margin:0; color:var(--muted); font-size:10px; }.post-calendar-nav { display:inline-grid; grid-template-columns:34px minmax(130px,auto) 34px; gap:5px; align-items:center; }.post-calendar-nav button { min-height:32px; border:1px solid rgba(104,232,255,.22); border-radius:10px; color:#dffbff; background:rgba(104,232,255,.06); font:800 15px var(--f-display); cursor:pointer; }.post-calendar-nav button:hover { background:rgba(104,232,255,.13); }.post-calendar-nav .post-calendar-month { padding:0 12px; font-size:11px; }.post-calendar-track { display:grid; grid-template-columns:34px minmax(0,1fr) 34px; gap:7px; align-items:center; }.post-calendar-swipe { width:34px; height:70px; border:1px solid rgba(104,232,255,.25); border-radius:12px; color:#dffbff; background:rgba(104,232,255,.07); font:900 22px/1 var(--f-display); cursor:pointer; }.post-calendar-swipe:hover { color:#061426; background:linear-gradient(135deg,#68e8ff,#a884ff); }.post-calendar-scroll { min-width:0; overflow-x:auto; overflow-y:hidden; padding:2px 1px 9px; scroll-snap-type:x mandatory; scroll-padding-inline:1px; scrollbar-width:thin; -webkit-overflow-scrolling:touch; touch-action:pan-x; }.post-calendar-row { display:flex; gap:8px; width:max-content; min-width:100%; align-items:stretch; }.post-calendar-day { flex:0 0 132px; min-height:190px; padding:10px; scroll-snap-align:start; border:1px solid rgba(255,255,255,.08); border-radius:15px; background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.018)); }.post-calendar-day.is-today { border-color:rgba(104,232,255,.6); box-shadow:inset 0 0 0 1px rgba(104,232,255,.14),0 8px 22px rgba(104,232,255,.08); }.post-calendar-day-head { display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; gap:0 5px; align-items:end; padding-bottom:8px; border-bottom:1px solid rgba(255,255,255,.07); }.post-calendar-day-head span { color:var(--muted); font-size:9px; font-weight:800; }.post-calendar-day-head b { grid-row:1/3; grid-column:2; color:#eef9ff; font:900 27px/1 var(--f-display); }.post-calendar-day-head small { color:var(--dim); font-size:8px; }.post-calendar-day.is-today .post-calendar-day-head span,.post-calendar-day.is-today .post-calendar-day-head b { color:#8cecff; }.post-calendar-progress { display:flex; align-items:baseline; justify-content:space-between; gap:5px; padding:7px 1px 6px; }.post-calendar-progress b { color:#eef9ff; font:900 14px var(--f-display); }.post-calendar-progress small { color:var(--dim); font-size:7px; }.post-calendar-events { display:grid; gap:6px; align-content:start; min-height:102px; padding-top:2px; }.post-calendar-free { align-self:center; justify-self:center; color:var(--dim); font-size:8.5px; }.post-calendar-event { overflow:hidden; padding:7px; border-left:3px solid #68e8ff; border-radius:8px; background:rgba(104,232,255,.08); }.post-calendar-event b,.post-calendar-event small { display:block; overflow:hidden; text-overflow:ellipsis; }.post-calendar-event b { display:-webkit-box; color:#eaf8ff; font-size:8px; line-height:1.35; -webkit-line-clamp:2; -webkit-box-orient:vertical; }.post-calendar-event small { margin-top:3px; color:#9fc0d2; font-size:7.5px; white-space:nowrap; }.post-calendar-event.is-working { border-left-color:#ffbd4a; background:rgba(255,189,74,.09); }.post-calendar-event.is-review { border-left-color:#a884ff; background:rgba(168,132,255,.09); }.post-calendar-event.is-done { border-left-color:var(--green); background:rgba(95,245,179,.09); }.post-calendar-event.is-error { border-left-color:#ff657c; background:rgba(255,101,124,.09); }.post-calendar-event.is-live { border-left-color:#68e8ff; }.post-calendar-legend { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; color:var(--dim); font-size:8px; }.post-calendar-legend span::before { content:''; display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:#68e8ff; }.post-calendar-legend .is-working::before { background:#ffbd4a; }.post-calendar-legend .is-review::before { background:#a884ff; }.post-calendar-legend .is-done::before { background:var(--green); }.post-calendar-empty { margin:8px 0 0; padding:9px 11px; border:1px dashed rgba(104,232,255,.2); border-radius:10px; color:var(--dim); background:rgba(104,232,255,.035); font-size:9px; }
.post-calendar-day { appearance:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.post-calendar-day:hover { border-color:rgba(104,232,255,.38); background:linear-gradient(160deg,rgba(104,232,255,.09),rgba(255,255,255,.025)); }
.post-calendar-day:focus-visible { outline:2px solid #68e8ff; outline-offset:2px; }
.post-calendar-day.has-plan { border-color:rgba(168,132,255,.45); }
.post-calendar-plan-pending { padding:7px; border-left:3px solid #a884ff; border-radius:8px; background:rgba(168,132,255,.1); }
.post-calendar-plan-pending b,.post-calendar-plan-pending small { display:block; }.post-calendar-plan-pending b { color:#e9e0ff; font-size:8.5px; }.post-calendar-plan-pending small { margin-top:3px; color:#b8a7de; font-size:7.5px; }
.post-plan-dialog { position:fixed; z-index:130; inset:0; display:grid; place-items:center; padding:20px; background:rgba(1,7,17,.74); backdrop-filter:blur(10px); }.post-plan-dialog[hidden] { display:none; }
.post-plan-card { width:min(560px,100%); max-height:min(820px,calc(100vh - 32px)); overflow:auto; padding:22px; border:1px solid rgba(104,232,255,.4); border-radius:22px; background:linear-gradient(145deg,#13243b,#091322); box-shadow:0 30px 90px rgba(0,0,0,.65); }
.post-plan-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }.post-plan-head h2 { margin:3px 0 5px; font:800 24px var(--f-display); }.post-plan-head p:not(.eyebrow) { margin:0; color:var(--muted); }.post-plan-head > button { width:38px; height:38px; border:1px solid var(--line-2); border-radius:12px; color:#fff; background:rgba(255,255,255,.04); font-size:25px; cursor:pointer; }
.post-plan-presets { display:grid; grid-template-columns:repeat(6,1fr); gap:7px; margin-top:12px; }.post-plan-presets button { min-height:42px; border:1px solid rgba(104,232,255,.2); border-radius:11px; color:#dffbff; background:rgba(104,232,255,.06); font:800 15px var(--f-display); cursor:pointer; }.post-plan-presets button:hover { color:#061426; background:linear-gradient(135deg,#68e8ff,#a884ff); }
.post-plan-schedule { display:grid; gap:14px; margin-top:18px; padding-top:16px; border-top:1px solid rgba(255,255,255,.09); }.post-plan-times-head { display:flex; align-items:end; justify-content:space-between; gap:12px; }.post-plan-times-head b { color:#dce9f6; font-size:13px; }.post-plan-times-head small { color:var(--dim); font-size:10px; }.post-plan-times { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.post-plan-time { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:9px; padding:8px 10px; border:1px solid rgba(104,232,255,.13); border-radius:11px; background:rgba(104,232,255,.035); }.post-plan-time span { color:var(--muted); font-size:10px; font-weight:800; }.post-plan-time input { width:100%; min-width:0; padding:8px 10px; border:1px solid var(--line-2); border-radius:9px; color:var(--ink); background:rgba(7,17,34,.76); font:inherit; color-scheme:dark; }.post-plan-times-empty { grid-column:1/-1; margin:0; padding:12px; border:1px dashed rgba(104,232,255,.2); border-radius:11px; color:var(--dim); text-align:center; font-size:10px; }
.post-plan-note { margin:14px 0 0; padding:10px 12px; border-radius:11px; color:#9fc0d2; background:rgba(104,232,255,.05); font-size:10px; line-height:1.5; }.post-plan-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }
@media (max-width:620px) { .post-plan-dialog { padding:10px; }.post-plan-card { padding:17px; border-radius:18px; }.post-plan-times { grid-template-columns:1fr; } }
.brief-card { overflow: hidden; }
.draft-chip { padding: 5px 10px; border-radius: 99px; color: #8cecff; background: rgba(104,232,255,.08); border: 1px solid rgba(104,232,255,.22); font-size: 12px; }
.brief-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 700; color: #dce9f6; }
.field-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ai-draft-btn { border:1px solid rgba(104,232,255,.42); border-radius:999px; padding:7px 12px; color:#8cecff; background:rgba(104,232,255,.08); font:700 12px/1 inherit; cursor:pointer; white-space:nowrap; }
.ai-draft-btn:hover { background:rgba(104,232,255,.16); transform:translateY(-1px); }
.field input,.field select,.field textarea { width: 100%; min-width: 0; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--ink); background: rgba(7,17,34,.76); font: inherit; outline: 0; }
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus,.field select:focus,.field textarea:focus { border-color: rgba(104,232,255,.7); box-shadow: 0 0 0 3px rgba(104,232,255,.1); }
.field small { color: var(--dim); font-size: 11.5px; }
.brief-preview { grid-column: 1 / -1; padding: 14px 15px; border-radius: 14px; border: 1px dashed rgba(104,232,255,.34); background: rgba(104,232,255,.045); }
.brief-preview span,.brief-preview b { display: block; }
.brief-preview span { color: #8cecff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brief-preview b { margin-top: 4px; }
.brief-preview p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.brief-submit { grid-column: 1 / -1; justify-self: start; }
.ai-config { border:1px solid rgba(104,232,255,.24); border-radius:16px; padding:16px; margin:0; background:linear-gradient(145deg,rgba(104,232,255,.055),rgba(130,91,255,.045)); }
.ai-config legend { padding:0 8px; color:#dce9f6; font-weight:800; }
.api-source-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.api-source-row label { display:flex; gap:10px; align-items:center; padding:12px; border:1px solid var(--line-2); border-radius:12px; background:rgba(7,17,34,.66); cursor:pointer; }
.api-source-row input { accent-color:#68e8ff; }
.api-source-row span,.api-source-row small { display:block; }
.api-source-row b { color:var(--ink); font-size:13px; }
.api-source-row small { color:var(--dim); margin-top:2px; font-size:11px; }
.ai-service-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.ai-service { display:grid; gap:10px; padding:13px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background:rgba(3,12,27,.55); }
.ai-service-head { display:flex; align-items:center; gap:8px; color:#eef7ff; }
.ai-service-head span { font-size:20px; }
.api-security-note { margin:12px 2px 0; color:var(--dim); font-size:11.5px; line-height:1.5; }
.gemini-signup{margin:0;padding:12px 14px;border:1px solid rgba(104,232,255,.25);border-radius:12px;color:var(--text);background:rgba(104,232,255,.06);font-size:11px}.gemini-signup a{color:#75e9ff;font-weight:800}.gemini-signup small{display:block;margin-top:4px;color:var(--dim)}
.voice-disabled{margin:0;padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.035)}.voice-disabled b,.voice-disabled small{display:block}.voice-disabled b{color:#d9e6f7}.voice-disabled small{margin-top:4px;color:var(--dim);font-size:11px}
.media-config { border:1px solid rgba(255,199,92,.22); border-radius:16px; padding:16px; margin:0; background:linear-gradient(145deg,rgba(255,199,92,.055),rgba(255,111,184,.035)); }
.media-config legend { padding:0 8px; color:#dce9f6; font-weight:800; }
.media-grid,.subtitle-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.subtitle-row { grid-template-columns:1.15fr 1fr 1fr; margin:12px 0 0; }
.check-card { display:flex; align-items:center; gap:10px; min-height:68px; padding:12px; border:1px solid var(--line-2); border-radius:12px; background:rgba(7,17,34,.66); cursor:pointer; }
.check-card input { accent-color:#68e8ff; }
.check-card span,.check-card small { display:block; }
.check-card b { color:var(--ink); font-size:13px; }
.check-card small { color:var(--dim); margin-top:2px; font-size:11px; }
.agent-config-fields [data-customer-setting="media-source-summary"] { margin:0; padding:10px 12px; border:1px solid rgba(95,245,179,.22); border-radius:11px; color:#9cf4c4; background:rgba(95,245,179,.06); }
.agent-config-fields [data-customer-setting="media-source-summary"].is-warning { border-color:rgba(255,181,63,.35); color:#ffd486; background:rgba(255,181,63,.08); }
.agent-flow-profile { padding:16px 18px; border:1px solid rgba(104,232,255,.42); border-radius:18px; background:linear-gradient(135deg,rgba(36,180,210,.14),rgba(139,103,255,.1)); display:flex; flex-direction:column; gap:6px; }
.agent-flow-profile b { color:#b8f7ff; font-size:1.02rem; }
.agent-flow-profile small { color:var(--muted); overflow-wrap:anywhere; }
.customer-media-uploader { display:grid; gap:10px; padding:13px; border:1px dashed rgba(104,232,255,.42); border-radius:13px; background:rgba(104,232,255,.05); }
.customer-media-pick { position:relative; display:grid; gap:5px; padding:14px; border:1px solid rgba(104,232,255,.55); border-radius:12px; color:#06131d; background:linear-gradient(135deg,#7de8ff,#a994ff); cursor:pointer; box-shadow:0 10px 28px rgba(73,191,255,.16); }
.customer-media-pick:hover { filter:brightness(1.06); }.customer-media-pick:focus-within { outline:2px solid #fff; outline-offset:2px; }
.customer-media-pick input[type="file"] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.customer-media-pick span { font-weight:900; font-size:13px; }.customer-media-pick small { color:rgba(6,19,29,.72); font-size:10px; }
.customer-media-uploader > p { margin:0; color:#9cf4c4; font-size:11px; }
.customer-media-uploader ol { display:grid; gap:6px; margin:0; padding-left:22px; color:var(--ink); }
.customer-media-uploader li b,.customer-media-uploader li small { display:block; overflow-wrap:anywhere; }
.customer-media-uploader li b { font-size:11px; }.customer-media-uploader li small { color:var(--dim); font-size:9px; }
.publish-config { border:1px solid rgba(121,255,177,.22); border-radius:16px; padding:16px; margin:0; background:linear-gradient(145deg,rgba(64,225,151,.055),rgba(104,232,255,.035)); }
.publish-config legend { padding:0 8px; color:#dce9f6; font-weight:800; }
.publish-mode-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.publish-mode-row label { display:flex; gap:10px; align-items:center; padding:12px; border:1px solid var(--line-2); border-radius:12px; background:rgba(7,17,34,.66); cursor:pointer; }
.publish-mode-row input { accent-color:#68e8ff; }
.publish-mode-row span,.publish-mode-row small { display:block; }
.publish-mode-row b { color:var(--ink); font-size:13px; }
.publish-mode-row small { color:var(--dim); margin-top:2px; font-size:11px; }
.schedule-grid { display:grid; grid-template-columns:2fr 1fr; gap:12px; }
.schedule-grid input:disabled { opacity:.5; cursor:not-allowed; }
.schedule-note { display:flex; align-items:flex-start; gap:8px; margin:12px 2px 0; color:var(--dim); font-size:11.5px; line-height:1.5; }
.schedule-note .dot { flex:0 0 auto; margin-top:4px; }
.duplicate-warning { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 15px; border:1px solid rgba(255,184,79,.48); border-radius:14px; background:rgba(255,155,45,.1); }
.duplicate-warning[hidden] { display:none; }
.duplicate-warning b { color:#ffd89c; }
.duplicate-warning p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.duplicate-actions { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.client-side { display: grid; gap: 18px; }
.client-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.client-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.client-steps li:last-child { border: 0; }
.client-steps i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font: 800 12px var(--f-display); color: var(--muted); border: 1px solid var(--line-2); }
.client-steps .done i { color: #06111f; border-color: var(--green); background: var(--green); }
.client-steps b,.client-steps small { display: block; }
.client-steps small { margin-top: 2px; color: var(--muted); }
.draft-list { display: grid; gap: 8px; }
.draft-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.draft-item b,.draft-item small { display: block; }
.draft-item b { font-size: 13.5px; }
.draft-item small { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.draft-item > span { color: #8cecff; font-size: 11px; font-weight: 700; }
.draft-item.is-highlighted { border-color:#ffd36b; box-shadow:0 0 0 3px rgba(255,211,107,.12); }
@media (max-width: 900px) { .client-grid { grid-template-columns: 1fr; } .client-side { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) { .channel-chart-empty { grid-template-columns:46px minmax(0,1fr); }.auth-google-card{grid-template-columns:46px minmax(0,1fr)}.auth-google-card .btn{grid-column:1/-1;justify-content:center} }
@media (max-width: 640px) { .channel-dashboard { padding:14px; border-radius:19px; }.channel-dashboard-head { align-items:stretch; flex-direction:column; }.channel-data-state { align-self:flex-start; }.channel-metrics { grid-template-columns:repeat(4,150px); }.channel-chart-card { min-height:240px; }.channel-chart-title > span { width:100%; margin-left:0; }.channel-range { margin-left:auto; }.channel-chart-svg { height:180px; }.channel-chart-empty { inset:58px 12px 12px; grid-template-columns:1fr; text-align:center; }.channel-empty-icon { margin:auto; }.channel-ai-note { grid-template-columns:1fr; }.channel-office-summary { grid-template-columns:repeat(4,125px); } }
@media (max-width:900px){.auth-shell{grid-template-columns:1fr}.auth-intro{padding:8px}.auth-panels{grid-template-columns:1fr 1fr}}
@media (max-width: 760px) { .office-directory { grid-template-columns: 1fr; } .office-create-form { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .room-picker{inset:12px}.room-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.room-canvas{min-height:330px}.room-screen{left:35%;width:28%}.room-sign{right:3%;}.room-agent{transform:scale(.88);transform-origin:bottom} }
@media (max-width: 900px) { .ai-service-grid,.subtitle-row { grid-template-columns:1fr; } }
@media (max-width: 900px) { .agent-config-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.agent-config-fields{grid-template-columns:1fr} }
@media (max-width: 640px) { .office-hq { align-items: flex-start; flex-direction: column; padding: 18px; } .office-card { grid-template-columns: 48px minmax(0,1fr); padding: 15px; } .office-mark { width: 48px; height: 48px; border-radius: 14px; } .client-hero { align-items: flex-start; padding: 18px; flex-direction: column; } .client-safe { max-width: none; } .room-toolbar,.agent-mode-bar{align-items:flex-start;flex-direction:column}.agent-mode-actions{width:100%}.agent-mode-actions button{flex:1}.room-canvas{min-height:300px}.room-window{width:34%;height:29%}.room-sign{top:5%;max-width:48%;}.room-sign .room-logo{display:none}.room-sign{grid-template-columns:1fr}.room-screen{top:34%;left:37%;width:26%;min-width:0;padding:8px}.room-screen b{font-size:20px}.room-agent{width:58px}.room-agent-label{overflow:hidden;text-overflow:ellipsis}.agent-1{left:5%}.agent-2{left:22%}.agent-3{left:38%}.agent-4{right:38%}.agent-5{right:20%}.agent-6{right:3%}.youtube-connect { grid-template-columns: 52px minmax(0,1fr); padding: 17px; } .youtube-brand { width: 50px; height: 50px; border-radius: 15px; } .youtube-action { grid-column: 1 / -1; width: 100%; justify-items: stretch; } .youtube-action .btn { justify-content: center; } .brief-form { grid-template-columns: 1fr; } .field-wide,.brief-preview,.brief-submit { grid-column: 1; } .client-side { grid-template-columns: 1fr; } .api-source-row,.publish-mode-row,.schedule-grid,.media-grid { grid-template-columns:1fr; } .field-title { align-items:flex-start; } .duplicate-warning{align-items:stretch;flex-direction:column}.duplicate-actions{justify-content:flex-start} }
@media (max-width:640px){.auth-shell{margin:12px 0;padding:16px;border-radius:20px}.auth-panels{grid-template-columns:1fr}.auth-google-card{grid-template-columns:40px minmax(0,1fr);padding:13px}.google-mark{width:40px;height:40px}.account-chip span{display:none}.account-chip{padding:4px}.account-chip button{padding:6px}.topbar-meta{gap:5px}.youtube-connect-compact{grid-template-columns:44px minmax(0,1fr)}.youtube-connect-compact .youtube-action{grid-column:1/-1;width:100%;min-width:0}.youtube-connect-compact .youtube-action .btn{width:100%;justify-content:center}}
@media (max-width:640px){.agent-config-dock{padding:10px;border-radius:16px}.agent-config-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.agent-publish-options{grid-template-columns:1fr}.agent-config-foot{align-items:stretch;flex-direction:column}.agent-config-foot .btn{justify-content:center}.room-agent-actions{transform:scale(.9)}.agent-requirement{padding:12px}.agent-requirement-card{grid-template-columns:40px minmax(0,1fr);gap:12px;padding:17px;border-radius:18px}.agent-requirement-icon{width:40px;height:40px;border-radius:13px;font-size:20px}.agent-requirement-card h3{font-size:18px}.agent-requirement-actions{flex-direction:column}.agent-requirement-actions .btn{width:100%}}

[data-customer-setting][hidden]{display:none!important}
[data-customer-setting="subtitle-option"],[data-customer-setting="schedule"]{display:contents}
.agent-settings-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;padding:2px 3px}.agent-settings-title h2{margin:2px 0 3px;font:800 18px var(--f-display)}.agent-settings-title p{margin:0;color:var(--muted);font-size:10px}.agent-settings-title>span{padding:7px 10px;border:1px solid color-mix(in srgb,var(--room) 42%,transparent);border-radius:999px;color:var(--room);background:color-mix(in srgb,var(--room) 9%,transparent);font-size:9px;font-weight:800;white-space:nowrap}.room-agent-actions .room-agent-run{min-width:46px;padding-inline:8px}
@media (max-width:760px){.room-agent.is-ready{animation-duration:calc(var(--walk-speed) * 1.35)}.room-floor-lines{display:none}}
@media (prefers-reduced-motion:reduce){.room-canvas::after,.room-floor-lines{animation:none!important}.room-agent.is-ready{animation-duration:calc(var(--walk-speed) * 1.6)}.room-agent .bot-stack{animation-duration:1.1s}}

/* เชื่อม YouTube แบบแอปของลูกค้า (เพิ่ม 2026-11-04) */
.yt-setup { grid-template-columns:48px minmax(0,1fr); align-items:start; }
.yt-setup-body { grid-column:1/-1; display:grid; gap:12px; }
.yt-modes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.yt-mode { display:flex; gap:10px; align-items:flex-start; padding:11px 13px; border:1px solid rgba(255,255,255,.12); border-radius:14px; background:rgba(255,255,255,.03); }
.yt-mode b { display:block; font-size:13px; } .yt-mode small { display:block; font-size:11px; opacity:.72; }
.yt-mode.is-active { border-color:rgba(99,179,255,.55); background:rgba(99,179,255,.08); }
.yt-mode.is-disabled { opacity:.5; }
.yt-app-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; align-items:end; }
.yt-app-form .btn { justify-self:start; }
.yt-copy-row { display:flex; gap:8px; } .yt-copy-row input { flex:1; min-width:0; font-family:'IBM Plex Mono',monospace; font-size:11px; }
.yt-app-saved { display:grid; gap:8px; } .yt-app-saved small { font-size:11px; opacity:.72; }
.yt-app-actions { display:flex; flex-wrap:wrap; gap:8px; }
.yt-guide { font-size:12px; opacity:.9; } .yt-guide summary { cursor:pointer; font-weight:600; } .yt-guide ol { margin:8px 0 0; padding-left:20px; display:grid; gap:4px; }
.yt-warn { margin:0; padding:9px 12px; border-radius:12px; background:rgba(255,184,0,.12); border:1px solid rgba(255,184,0,.35); font-size:12px; }
@media (max-width:640px){ .yt-modes,.yt-app-form { grid-template-columns:1fr; } .yt-setup .youtube-action{ grid-column:1/-1; } }

/* หน้าเจ้าของระบบ (เพิ่ม 2026-11-04) */
.owner-summary,.owner-backup,.owner-user { margin-bottom:16px; }
.owner-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-top:12px; }
.owner-tile { padding:12px 14px; border-radius:14px; border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.03); display:grid; gap:2px; }
.owner-tile small { font-size:11px; opacity:.7; } .owner-tile b { font-size:22px; } .owner-tile span { font-size:10px; opacity:.6; }
.owner-tile.is-main { border-color:rgba(63,224,143,.4); background:rgba(63,224,143,.08); } .owner-tile.is-warn { border-color:rgba(255,184,0,.45); background:rgba(255,184,0,.08); }
.owner-plans { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:8px; margin-top:12px; }
.owner-plan { display:grid; padding:9px 12px; border-radius:12px; background:rgba(99,179,255,.07); font-size:12px; } .owner-plan i { font-style:normal; opacity:.7; }
.owner-backup { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; } .owner-backup h3 { margin:2px 0; } .owner-backup p { margin:0; font-size:12px; }
.owner-user-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:10px; } .owner-user-head small { display:block; font-size:11px; opacity:.7; }
.owner-office { border-top:1px solid rgba(255,255,255,.08); padding:12px 0 4px; display:grid; gap:10px; }
.owner-office-head small { margin-left:8px; font-size:11px; opacity:.7; }
.owner-badges { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.owner-badge { font-size:11px; padding:3px 9px; border-radius:999px; border:1px solid rgba(255,255,255,.14); opacity:.85; }
.owner-badge.is-on { border-color:rgba(63,224,143,.5); color:#7ff0b8; } .owner-badge.is-warn { border-color:rgba(255,184,0,.5); color:#ffd36b; }
.owner-office-edit { display:grid; grid-template-columns:1.2fr 1fr 1fr auto; gap:10px; align-items:end; }
@media (max-width:640px){ .owner-office-edit { grid-template-columns:1fr 1fr; } .owner-office-edit .btn { grid-column:1/-1; } }

/* แพ็กเกจ + ชำระด้วยสลิป (เพิ่ม 2026-11-04) */
.bill-card,.owner-pay { margin-bottom:16px; }
.bill-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0; }
.bill-plan { text-align:left; display:grid; gap:2px; padding:12px 14px; border-radius:14px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.03); color:inherit; font:inherit; cursor:pointer; }
.bill-plan b { font-size:15px; } .bill-plan span { font-size:13px; } .bill-plan small { font-size:11px; opacity:.7; }
.bill-plan.is-current { border-color:rgba(63,224,143,.45); } .bill-plan.is-active { border-color:rgba(99,179,255,.7); background:rgba(99,179,255,.1); }
.bill-pay { display:grid; gap:10px; padding:14px; border-radius:16px; border:1px dashed rgba(99,179,255,.4); }
.bill-amount b { display:block; font-size:28px; } .bill-amount small { font-size:11px; opacity:.7; }
.bill-to { list-style:none; margin:0; padding:0; display:grid; gap:6px; } .bill-to li { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .bill-to span { min-width:72px; font-size:12px; opacity:.7; }
.bill-upload { justify-self:start; cursor:pointer; }
.bill-history { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:6px; } .bill-history li { display:grid; padding:8px 10px; border-radius:10px; background:rgba(255,255,255,.03); }
.bill-history li span,.bill-history li small { font-size:11px; opacity:.75; } .bill-history li.is-ok b { color:#7ff0b8; } .bill-history li.is-bad b { color:#ff9b9b; }
.owner-pay-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; align-items:end; margin-bottom:10px; } .owner-pay-form .btn { justify-self:start; }
@media (max-width:640px){ .bill-plans,.owner-pay-form { grid-template-columns:1fr; } }

/* แก้หน้าตามือถือ (เพิ่ม 2026-11-04) */
.room-agent-label .lbl-short { display:none; }
@media (max-width:760px){
  /* ป้ายหุ่น: ใช้ชื่อสั้น ไม่โดนตัด ไม่ทับกัน */
  .room-agent-label .lbl-full { display:none; }
  .room-agent-label .lbl-short { display:inline; }
  .room-agent-label { overflow:visible; text-overflow:clip; font-size:10px; padding:3px 6px; }
  .room-agent > small { display:none; }
  .room-desk-tag { display:none; }
  /* การ์ดงานวันนี้: ย้ายไปมุมซ้ายบน ไม่บังหุ่น */
  .room-screen { top:3%; left:3%; right:auto; width:auto; min-width:0; padding:6px 10px; }
  .room-screen b { font-size:18px; } .room-screen small { display:none; }
  /* ใช้ตำแหน่งโต๊ะเดียวกับจอใหญ่ ไม่ดึงหุ่นริมซ้าย/ขวากลับมาเรียงเป็นแถว */
  .room-crew { overflow:hidden; }
  /* เมนูล่าง: แถวเดียว เลื่อนซ้าย-ขวาได้ */
  .tabbar { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(68px,1fr); overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; }
  .tabbar::-webkit-scrollbar { display:none; }
}
@media (max-width:760px){
  /* ห้องหุ่น: เต็มความกว้างจอ ไม่ถูกตัดด้านขวา (หุ่น E, F เห็นครบ) */
  .room-canvas { width:100%; aspect-ratio:auto; min-height:0; height:clamp(260px, 82vw, 340px); background-position:center; }
}
@media (max-width:480px){
  /* หัวหน้า: ซ่อนป้ายแหล่งข้อมูลยาว ให้ชื่อออฟฟิศไม่โดนตัด (ดูได้ที่หน้า การเชื่อมต่อ) */
  #sourceChip, #freshChip { display:none !important; }
}
@media (max-width:760px){
  /* มือถือหยุดเดินเพื่อไม่ให้ชนกัน แต่ยังยืนตามจุดทำงานในภาพ ไม่จัดเป็นแถวจำลอง */
  .room-agent, .room-agent.is-ready { animation:roomBob 3s ease-in-out infinite; right:auto !important; }
  .room-agent.is-ready .bot-front { animation:none; opacity:1; } .room-agent.is-ready .bot-back { animation:none; opacity:0; }
  .agent-1 { left:25.5% !important; top:16% !important; }
  .agent-2 { left:10.5% !important; top:37% !important; }
  .agent-3 { left:34.8% !important; top:56% !important; }
  .agent-4 { left:45.5% !important; top:10.5% !important; }
  .agent-5 { left:73.2% !important; top:40% !important; }
  .agent-6 { left:87.2% !important; top:28% !important; }
}

/* ตรวจคลิปก่อนโพสต์ (เพิ่ม 2026-11-04) */
.review-card { margin-bottom:16px; border-color:rgba(99,179,255,.45); }
.review-item { display:grid; grid-template-columns:minmax(0,220px) minmax(0,1fr); gap:16px; padding:12px 0; border-top:1px solid rgba(255,255,255,.08); }
.review-video { width:100%; aspect-ratio:9/16; border-radius:14px; background:#000; }
.review-side { display:grid; gap:10px; align-content:start; } .review-side small { opacity:.7; font-size:12px; }
@media (max-width:640px){ .review-item { grid-template-columns:1fr; } .review-video { max-height:70vh; } }
.channel-metrics-row.has-data .channel-metrics small { color:#9cf4c4; }

/* แม่แบบกราฟิกกรอบเจาะกลาง 10 แบบ (เพิ่ม 2026-11-06) */
.frame-template-gallery { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; }
.frame-template-card { display:grid; grid-template-columns:54px minmax(0,1fr); grid-template-rows:auto auto; gap:2px 9px; align-items:center; min-width:0; padding:8px; border:1px solid var(--line-2); border-radius:12px; color:var(--ink); background:rgba(255,255,255,.025); text-align:left; cursor:pointer; transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.frame-template-card:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--room) 55%,transparent); }
.frame-template-card.is-selected { border-color:var(--room); background:color-mix(in srgb,var(--room) 10%,transparent); box-shadow:0 0 0 2px color-mix(in srgb,var(--room) 12%,transparent),0 8px 22px rgba(0,0,0,.2); }
.frame-template-preview { grid-row:1/3; position:relative; width:54px; aspect-ratio:9/16; overflow:hidden; border-radius:8px; background-position:center; background-size:cover; box-shadow:0 5px 14px rgba(0,0,0,.35); }
.frame-template-preview i { position:absolute; left:12%; right:12%; top:12%; height:63%; border:2px solid rgba(255,255,255,.9); border-radius:3px; background:rgba(255,255,255,.08); box-shadow:0 0 10px rgba(255,255,255,.16); }
.frame-template-card b { align-self:end; overflow:hidden; text-overflow:ellipsis; color:#f5fbff; font-size:9px; white-space:nowrap; }
.frame-template-card small { align-self:start; display:-webkit-box; overflow:hidden; color:var(--dim); font-size:7.5px; line-height:1.3; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.frame-template-select { margin-bottom:-2px; }
@media (max-width:900px) { .frame-template-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .frame-template-gallery { display:flex; overflow-x:auto; padding-bottom:5px; scroll-snap-type:x mandatory; } .frame-template-card { flex:0 0 180px; scroll-snap-align:start; } }

/* Office review policy: independent from the Manual/Auto production controls. */
.review-auto-post { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px; margin:0 0 18px; border:1px solid var(--line, #29405a); border-radius:16px; background:rgba(96,205,255,.05); }
.review-auto-post > div { display:grid; gap:5px; }
.review-auto-post small { color:var(--muted, #94a9c1); font-size:13px; line-height:1.5; }
.review-auto-switch { flex-shrink:0; display:flex; align-items:center; gap:10px; padding:8px 12px; border:1px solid #4b6076; border-radius:30px; background:#172536; color:#c6d3e2; cursor:pointer; }
.review-auto-switch i { display:block; width:44px; height:26px; padding:3px; background:#526173; border-radius:20px; }
.review-auto-switch i::after { content:""; display:block; width:20px; height:20px; border-radius:50%; background:#fff; transition:transform .18s; }
.review-auto-switch.is-on { color:#8ef4c1; border-color:#3b9970; }
.review-auto-switch.is-on i { background:#22b573; }
.review-auto-switch.is-on i::after { transform:translateX(18px); }
.review-auto-switch:disabled { opacity:.5; cursor:wait; }
@media(max-width:480px) { .review-auto-post { gap:12px; padding:14px; } .review-auto-post small { font-size:12px; } }

.posting-controls h2 { margin:0 0 4px; font-size:20px; }


/* ---------- PWA: ปุ่มติดตั้ง · คำแนะนำ iPhone · แจ้งอัปเดต · แจ้งออฟไลน์ ---------- */
.pwa-install { appearance: none; border: 1px solid rgba(73, 220, 255, .45); background: rgba(73, 220, 255, .12); color: #bff3ff; font: inherit; font-size: .8rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.pwa-install:hover { background: rgba(73, 220, 255, .22); }
.pwa-install[hidden], .pwa-ios-tip[hidden] { display: none !important; }
.pwa-ios-tip, .pwa-banner, .pwa-offline { position: fixed; z-index: 90; left: 12px; right: 12px; margin: 0 auto; max-width: 440px; border-radius: 16px; border: 1px solid var(--line, rgba(255, 255, 255, .14)); background: rgba(8, 18, 36, .96); color: #eaf1ff; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); backdrop-filter: blur(16px); font-size: .9rem; line-height: 1.5; }
.pwa-ios-tip { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); padding: 14px 16px; }
.pwa-ios-tip ol { margin: 8px 0 10px; padding-left: 20px; }
.pwa-ios-tip button, .pwa-banner button { appearance: none; border: 0; border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; background: #49dcff; color: #041020; }
.pwa-banner { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pwa-banner span { flex: 1 1 100%; }
.pwa-banner .pwa-later { background: transparent; color: #a9b8d4; border: 1px solid rgba(255, 255, 255, .2); }
.pwa-offline { top: calc(10px + env(safe-area-inset-top, 0px)); padding: 10px 14px; display: grid; gap: 2px; border-color: rgba(255, 176, 64, .6); background: rgba(46, 28, 4, .96); }
.pwa-offline span { color: #ffd9a3; font-size: .82rem; }
@media (display-mode: standalone) { .pwa-install { display: none; } }

/* ---- หุ่นเดินในห้อง (room-walk.js) · ไม่มี JS = ใช้แอนิเมชันเดิม ---- */
.room-crew.walk-js .room-agent.is-ready { animation:roomBob 3s ease-in-out infinite; transition:none; }
.room-crew.walk-js .room-agent.is-ready .bot-stack { animation:none; }
.room-crew.walk-js .room-agent.is-ready.is-walking .bot-stack { animation:roomStep .64s ease-in-out infinite; }
.room-crew.walk-js .room-agent.is-ready .bot-front { animation:none; opacity:1; }
.room-crew.walk-js .room-agent.is-ready .bot-back { animation:none; opacity:0; }
.room-crew.walk-js .room-agent.is-ready.face-away .bot-front { opacity:0; }
.room-crew.walk-js .room-agent.is-ready.face-away .bot-back { opacity:1; }
.room-bubble { position:absolute; z-index:9; left:50%; bottom:calc(100% + 6px); transform:translateX(-50%); width:max-content; max-width:150px; padding:5px 9px; border-radius:12px; background:rgba(255,255,255,.96); color:#10243b; font:700 11px/1.3 var(--f-body, system-ui, sans-serif); box-shadow:0 6px 18px rgba(0,0,0,.35); pointer-events:none; animation:bubbleIn .22s ease-out; }
.room-bubble::after { content:''; position:absolute; left:50%; top:100%; width:8px; height:8px; margin-left:-4px; margin-top:-4px; transform:rotate(45deg); background:inherit; }
@keyframes bubbleIn { from { opacity:0; transform:translateX(-50%) translateY(4px) scale(.9); } to { opacity:1; transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) { .room-bubble { animation:none; } }

/* ---- คำเชิญสมัคร (เจ้าของระบบ) ---- */
.owner-invite-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; align-items:end; margin:12px 0; }
.owner-invite-list { display:grid; gap:8px; }
.owner-invite { display:flex; align-items:center; gap:10px; justify-content:space-between; padding:8px 10px; border:1px solid var(--line,rgba(255,255,255,.12)); border-radius:12px; }
.owner-invite div { display:grid; gap:2px; min-width:0; } .owner-invite small { opacity:.7; }
.owner-invite:not(.is-usable) { opacity:.6; }
.owner-invite-new { margin:10px 0; padding:12px; border-radius:14px; background:rgba(110,240,190,.1); border:1px solid rgba(110,240,190,.4); }
.owner-invite-new code { display:inline-block; padding:4px 10px; font:700 17px/1.4 ui-monospace,Menlo,monospace; letter-spacing:.06em; user-select:all; }

/* เนื้อเรื่องถูกล็อกเมื่อเปิด “ให้ AI คิดเรื่องใหม่อัตโนมัติ” */
.field textarea[data-sync-field="story"]:disabled { opacity:.4; cursor:not-allowed; }
.ai-draft-btn:disabled { opacity:.45; cursor:not-allowed; }

.mini-check{display:flex;align-items:center;gap:8px;margin-top:-4px;color:var(--muted);font-size:12px;cursor:pointer}.mini-check input{width:15px;height:15px;margin:0;accent-color:var(--room,#68e8ff)}.mini-check span{line-height:1.3}

.post-plan-slot{display:grid;gap:6px;padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.025)}.post-plan-topic{display:grid;gap:4px}.post-plan-topic span{color:var(--muted);font-size:10px}.post-plan-topic input{width:100%}
.post-plan-topic input{min-width:0;padding:9px 11px;border:1px solid var(--line-2);border-radius:10px;color:var(--ink);background:rgba(7,17,34,.76);font:inherit;font-size:13px;outline:0}.post-plan-topic input::placeholder{color:var(--dim)}.post-plan-topic input:focus{border-color:var(--cyan,#68e8ff)}

.media-folders{display:grid;gap:8px;margin-bottom:10px}.media-folder-new{display:flex;gap:8px;align-items:center}.media-folder-new input{flex:1;min-width:0;padding:9px 11px;border:1px solid var(--line-2);border-radius:10px;color:var(--ink);background:rgba(7,17,34,.76);font:inherit;font-size:13px;outline:0}.media-folder-new input::placeholder{color:var(--dim)}.media-folder-new button{white-space:nowrap}.media-folder-files{margin:0;padding:0;list-style:none;display:grid;gap:4px;max-height:150px;overflow:auto}.media-folder-files li{display:flex;justify-content:space-between;gap:10px;padding:6px 9px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.025);font-size:11px}.media-folder-files li b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}.media-folder-files li small{color:var(--dim);white-space:nowrap}

.api-guide { display:grid; gap:12px; }
.api-guide-item summary { cursor:pointer; display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 12px; align-items:baseline; }
.api-guide-item summary small { opacity:.7; }
.api-guide-item ol { margin:12px 0; padding-left:22px; display:grid; gap:6px; }
.api-guide-item code { background:rgba(255,255,255,.08); padding:1px 5px; border-radius:4px; }

.review-tools { display:flex; flex-wrap:wrap; gap:8px; }
.review-tools .review-delete[data-armed="1"] { border-color:#ff657c; color:#ffd5db; background:rgba(255,101,124,.16); }

.posting-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
@media(max-width:480px) { .review-auto-post.posting-controls { flex-wrap:wrap; } .posting-actions { width:100%; justify-content:space-between; } }

.defaults-note { margin:4px 0 0; } .defaults-note .link-btn { background:none; border:0; padding:0; color:#8cecff; font:inherit; text-decoration:underline; cursor:pointer; }

.agent-config-tabs button, .room-agent [data-act="agent-config"] { position:relative; }
.agent-config-tabs button.is-complete, [data-act="agent-config"].is-complete { border-color:rgba(95,245,179,.6); background:rgba(95,245,179,.10); }
.agent-config-tabs button.is-complete b, [data-act="agent-config"].is-complete b { color:#04251a; background:linear-gradient(135deg,#5ff5b3,#9cf4c4); }
.agent-config-tabs button.is-complete::after { content:'✓'; position:absolute; top:6px; right:10px; color:#5ff5b3; font:900 14px/1 var(--f-display); }

/* สถานะหุ่น: ทำงาน = เขียวกะพริบ · ค้าง/ล้ม = แดงเตือน */
@keyframes robotGreenBlink{0%,100%{filter:drop-shadow(0 0 3px #3fe08f) drop-shadow(0 0 8px rgba(63,224,143,.55))}50%{filter:drop-shadow(0 0 9px #3fe08f) drop-shadow(0 0 24px #3fe08f) brightness(1.2)}}
@keyframes robotRedBlink{0%,100%{filter:drop-shadow(0 0 3px #ff3b55) drop-shadow(0 0 8px rgba(255,59,85,.6))}50%{filter:drop-shadow(0 0 10px #ff3b55) drop-shadow(0 0 26px #ff3b55) brightness(1.15)}}
.room-agent.is-working .bot-stack { animation:roomWork .9s ease-in-out infinite, robotGreenBlink 1s ease-in-out infinite; }
.room-agent.is-working::after { background:rgba(63,224,143,.28); box-shadow:0 0 24px #3fe08f; }
.room-agent.is-working .room-agent-label { border-color:#3fe08f; box-shadow:0 0 16px rgba(63,224,143,.65); }
.room-agent.is-stuck { animation:none; transform:translate(0,0); }
.room-agent.is-stuck .bot-front { opacity:1; animation:none; }
.room-agent.is-stuck .bot-back { opacity:0; animation:none; }
.room-agent.is-stuck .bot-stack { animation:robotRedBlink .8s ease-in-out infinite; }
.room-agent.is-stuck::after { content:''; position:absolute; z-index:1; left:50%; bottom:9px; width:54px; height:18px; transform:translateX(-50%); border-radius:50%; background:rgba(255,59,85,.3); box-shadow:0 0 24px #ff3b55; }
.room-agent.is-stuck .room-desk-tag { opacity:1; color:#fff; background:#e0243f; font-weight:900; box-shadow:0 0 18px rgba(255,59,85,.8); }
.room-agent.is-stuck .room-agent-label { border:1px solid #ff3b55; box-shadow:0 0 18px rgba(255,59,85,.7); }
.room-agent.is-stuck small { color:#ffc2cb; font-weight:800; }
.room-agent.is-stuck small::before { content:'⚠ '; }
@media (prefers-reduced-motion:reduce){ .room-agent.is-working .bot-stack, .room-agent.is-stuck .bot-stack { animation-duration:2.4s; } }

.media-folder-files li .media-file-del{flex:none;border:1px solid rgba(255,120,120,.35);background:transparent;color:#ff9b9b;border-radius:8px;padding:2px 9px;font:inherit;font-size:11px;cursor:pointer}.media-folder-files li .media-file-del:hover,.media-folder-files li .media-file-del.is-confirm{background:rgba(255,90,90,.18);color:#fff}.media-folder-files li .media-file-del:disabled{opacity:.5;cursor:default}

/* Calendar production timing and editable future plans. */
.post-plan-production { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; }
.post-plan-production [hidden] { display:none; }
.post-plan-actions { flex-wrap:wrap; }
.post-plan-actions [data-act="post-plan-delete"] { color:#ff9ca9; margin-right:auto; }
@media (max-width:620px) { .post-plan-production { grid-template-columns:1fr; } }

/* Individual calendar jobs and plans have separate accessible controls. */
.post-calendar-day { color:var(--ink); text-align:left; }
.post-calendar-plan-open { display:block; width:100%; padding:0; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.post-calendar-events > button { display:block; width:100%; font:inherit; text-align:left; cursor:pointer; }
.post-calendar-edit-plan { margin-top:9px; padding:7px; width:100%; border:1px solid rgba(104,232,255,.2); border-radius:8px; background:rgba(104,232,255,.04); color:#a8e9ff; font-size:9px; cursor:pointer; }

/* Compact calendar cards; long lists scroll inside their own day. */
.post-calendar-row { align-items:flex-start; }
.post-calendar-day { display:flex; flex-direction:column; height:230px; min-height:0; align-self:flex-start; }
.post-calendar-events { flex:1; min-height:0; overflow-y:auto; scrollbar-width:thin; }
.post-calendar-day .post-calendar-edit-plan { flex-shrink:0; margin-top:8px; }

/* Per-clip removal changes the open plan only until Save is pressed. */
.post-plan-slot-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
.post-plan-slot-actions b{font-size:11px;color:var(--ink)}
.post-plan-slot-actions button{padding:6px 9px;border:1px solid rgba(255,146,157,.35);border-radius:8px;background:rgba(255,91,111,.07);color:#ffb8c1;font:inherit;font-size:10px;cursor:pointer}
.post-plan-slot-actions button:disabled{opacity:.5;cursor:not-allowed}
.post-calendar-plan-pending{width:100%;text-align:left;font:inherit;border-top:0;border-right:0;border-bottom:0;cursor:pointer}

/* ปฏิทิน: ช่องที่พลาดเวลาผลิต (เพิ่ม 2026-11-14) */
.post-calendar-missed{padding:7px;border-left:3px solid #ff657c;border-radius:8px;background:rgba(255,101,124,.1)}
.post-calendar-missed b,.post-calendar-missed small{display:block}.post-calendar-missed b{color:#ffd9df;font-size:8.5px}.post-calendar-missed small{margin-top:3px;color:#f0b3bd;font-size:7.5px;line-height:1.35}
.post-calendar-missed label{display:block;margin-top:5px}.post-calendar-missed input[type=time]{width:100%;margin-top:2px;padding:3px 5px;border:1px solid rgba(255,101,124,.35);border-radius:6px;background:rgba(0,0,0,.25);color:#fff;font:inherit;font-size:10px}
.post-calendar-requeue{width:100%;margin-top:5px;padding:5px;border:1px solid rgba(255,101,124,.45);border-radius:7px;background:transparent;color:#ffd9df;font:inherit;font-size:9px;font-weight:800;cursor:pointer}
.post-calendar-requeue:hover,.post-calendar-requeue.is-confirm{background:rgba(255,101,124,.25);color:#fff}.post-calendar-requeue:disabled{opacity:.5;cursor:default}

/* เจ้าของ: พื้นที่และประวัติการล้าง (เพิ่ม 2026-11-15) */
.owner-storage{margin-bottom:16px}.owner-storage h3{margin:2px 0}.owner-storage h4{margin:14px 0 6px;font-size:13px}.owner-storage p{margin:0;font-size:12px}
.owner-storage-list{margin:0;padding-left:18px;font-size:12px;line-height:1.55}.owner-storage-list li small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}.owner-storage-list code{font-size:11px;overflow-wrap:anywhere}
.owner-storage details{margin-top:8px;font-size:12px}.owner-storage details summary{cursor:pointer;color:var(--muted)}.owner-storage-warn{color:#ff9b9b;font-weight:700}
.owner-storage .owner-tile.is-warn b{color:#ff9b9b}

/* ผล QC ในหน้าตรวจคลิป (2026-11-16) */
.qc-box{margin:8px 0;padding:8px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.12);font-size:12px}.qc-box b{display:block}.qc-box small{display:block;margin-top:2px;color:var(--muted)}
.qc-box ul{margin:6px 0 0;padding-left:18px}.qc-pass{border-color:rgba(95,245,179,.45);background:rgba(95,245,179,.07)}.qc-check{border-color:rgba(255,189,74,.5);background:rgba(255,189,74,.08)}.qc-muted{color:var(--muted)}
