:root {
  --paper: #efebe3; --ink: #1a1d26; --ink2: #5e6372; --line: rgba(26, 29, 38, .1);
  --glass: rgba(252, 251, 248, .74); --accent: #c8623f; --ok: #1f9d6b; --bad: #c8463b;
  --display: "Manrope", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 10px 40px rgba(18, 22, 36, .12), 0 1px 0 rgba(255, 255, 255, .6) inset;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #1a2141; color: var(--ink); font: 14px/1.45 var(--display); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#gate { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, #fbf9f4 0%, var(--paper) 70%); z-index: 20; padding: 16px; }
#gateForm { width: min(360px, 100%); text-align: center; display: grid; gap: 12px; }
#gateForm .mark { font-size: 42px; color: var(--accent); }
#gateForm h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
#gateForm p { margin: 0; color: var(--ink2); }
#gateForm input { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: 16px var(--mono); }
#gateForm button { padding: 14px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font-weight: 700; }
#gateErr { color: var(--bad); min-height: 20px; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; }

#loading { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #fbf9f4 0%, var(--paper) 75%); transition: opacity .7s ease; }
#loading.done { opacity: 0; }
#loading div { display: grid; gap: 6px; text-align: center; }
#loading .mark { font-size: 40px; color: var(--accent); animation: spin 2.4s linear infinite; display: inline-block; }
#loading b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
#loading small { color: var(--ink2); }
@keyframes spin { to { transform: rotate(360deg); } }

.tag.tuck { opacity: 0; pointer-events: none; }
.tag { pointer-events: auto; cursor: pointer; padding: 2px 8px 2px 5px; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(0, 0, 0, .14); font: 700 10px/1.5 var(--display); white-space: nowrap; display: flex; gap: 5px; align-items: center; color: var(--ink); transition: opacity .2s ease; }
.desk-code { pointer-events: auto; cursor: pointer; padding: 0 2px; border-radius: 2px; background: transparent; font: 600 5px/1.1 var(--display); color: #1f2128; letter-spacing: 0; opacity: .55; }
.desk-code.vacant { color: #8a3b2a; opacity: .95; }
.tag i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.tag:hover { background: #fff; transform: scale(1.06); }
.bwrap { width: 0; height: 0; pointer-events: none; }
.bubble { position: absolute; left: -18px; bottom: 6px; width: max-content; max-width: 240px; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 10px 26px rgba(20, 24, 40, .22); font: 500 12.5px/1.38 var(--display); color: var(--ink); transform-origin: 18px 100%; animation: pop .32s cubic-bezier(.2, 1.3, .4, 1); }
.bubble b { display: block; font-size: 10.5px; color: var(--ink2); margin-bottom: 2px; }
@keyframes pop { from { transform: translateY(8px) scale(.7); opacity: 0; } }

#top { position: fixed; left: 16px; right: 16px; top: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: 22px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow); z-index: 5; }
.brand { display: flex; flex-direction: column; margin-right: auto; }
.brand b { font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.brand span { color: var(--ink2); font-size: 12px; }
.clock { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 5px 12px; }
.clock b { font: 600 15px var(--mono); }
.clock small { color: var(--ink2); font-size: 10.5px; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; min-width: 60px; }
.stat small { color: var(--ink2); font-size: 11px; }
.stat b { font: 600 15px var(--mono); font-variant-numeric: tabular-nums; }
.stat.budget i { display: block; height: 4px; border-radius: 2px; background: var(--line); margin-top: 3px; overflow: hidden; }
.stat.budget em { display: block; height: 100%; width: 0; background: var(--ok); transition: width .6s; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease; }
.actions button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.actions button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.actions button[aria-pressed="true"] { background: var(--bad); color: #fff; border-color: var(--bad); }
.actions button:disabled { opacity: .45; cursor: default; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font: 600 11px/18px var(--mono); text-align: center; }
#notice { flex-basis: 100%; order: 9; padding: 8px 12px; border-radius: 12px; background: #fff4d6; color: #6b4a00; font-size: 13px; }

#floors { position: fixed; left: 16px; top: 50%; transform: translateY(-46%); display: flex; flex-direction: column; gap: 5px; z-index: 4; max-height: calc(100% - var(--topH, 96px) - 24px); overflow-y: auto; scrollbar-width: none; }
#floors button { text-align: left; padding: 8px 12px 8px 10px; border-radius: 14px; border: 0; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 4px 16px rgba(0, 0, 0, .08); font-weight: 700; font-size: 12px; display: flex; gap: 9px; align-items: center; min-width: 190px; transition: background .2s, transform .15s; }
#floors button:hover { transform: translateX(2px); }
#floors button span { display: flex; flex-direction: column; }
#floors button small { font-weight: 500; font-size: 10.5px; color: var(--ink2); }
#floors button i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
#floors button.on { background: var(--ink); color: #fff; }
#floors button.on small { color: rgba(255, 255, 255, .7); }

#feed { position: fixed; right: 16px; top: var(--topH, 96px); bottom: 16px; width: 330px; display: flex; flex-direction: column; border-radius: 22px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow); z-index: 4; overflow: hidden; }
.feedHead { padding: 14px 16px 10px; border: 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; background: none; text-align: left; cursor: default; position: relative; width: 100%; }
.short { display: none; }
.feedHead span { color: var(--ink2); font-size: 12px; }
#feedList { overflow-y: auto; padding: 10px 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.chatHead { font-size: 11px; color: var(--ink2); padding: 6px 4px 0; border-top: 1px dashed var(--line); margin-top: 4px; }
.chatHead:first-child { border-top: 0; margin-top: 0; }
.chatHead b { color: var(--ink); }
.msg { display: grid; grid-template-columns: 26px 1fr; gap: 8px; animation: fade .4s; }
.msg .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 11px var(--display); cursor: pointer; }
.msg .who { font-weight: 700; font-size: 12px; cursor: pointer; }
.msg .who small { color: var(--ink2); font-weight: 500; margin-left: 4px; }
.msg p { margin: 1px 0 0; font-size: 13px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

#drawer { position: fixed; right: 16px; top: var(--topH, 96px); bottom: 16px; width: 390px; border-radius: 22px; background: #fffefc; box-shadow: 0 20px 60px rgba(20, 24, 40, .24); z-index: 6; overflow-y: auto; padding: 22px 22px 28px; animation: slide .35s cubic-bezier(.2, .9, .3, 1); }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }
#drawerClose { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 26px; color: var(--ink2); }
#drawerBody h2 { margin: 8px 0 2px; font-size: 22px; letter-spacing: -.01em; }
#drawerBody .role { color: var(--ink2); margin-bottom: 10px; }
#drawerBody .swatch { width: 44px; height: 44px; border-radius: 14px; }
#drawerBody h3 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); margin: 18px 0 6px; }
#drawerBody .chips { display: flex; flex-wrap: wrap; gap: 6px; }
#drawerBody .chips span { padding: 3px 9px; border-radius: 999px; background: var(--paper); font-size: 12px; }
#drawerBody .kv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; font-size: 13px; }
#drawerBody .kv dt { color: var(--ink2); }
#drawerBody .kv dd { margin: 0; word-break: break-word; }
#drawerBody a { color: #1a5fd0; }
#drawerBody ul { margin: 0; padding-left: 18px; }
#drawerBody .ideas li { margin-bottom: 6px; }
.now { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 12px; background: var(--paper); }
.now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 157, 107, .18); }
.link { border: 0; background: none; color: #1a5fd0; font-weight: 700; padding: 0; margin-left: auto; }
.floorCard { border-top: 1px solid var(--line); padding: 12px 0 4px; display: grid; gap: 4px; }
.floorCard .link { margin: 0; text-align: left; color: var(--ink); font-size: 14px; }
.floorCard small { color: var(--ink2); }
.lesson { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.lesson h4 { margin: 0 0 4px; font-size: 14px; }
.lesson p { margin: 4px 0; font-size: 13px; }
.lesson .meta { color: var(--ink2); font-size: 12px; }
.lesson .btns { display: flex; gap: 8px; margin-top: 8px; }
.lesson .btns button { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.lesson .btns .yes { background: var(--ok); color: #fff; border-color: var(--ok); }
.lesson .state { font: 600 11px var(--mono); text-transform: uppercase; }
.lesson .state.approved { color: var(--ok); } .lesson .state.rejected { color: var(--bad); }
.empty { color: var(--ink2); }

@media (max-width: 900px) {
  #top { gap: 8px 10px; padding: 10px 12px; left: 10px; right: 10px; top: 10px; border-radius: 18px; }
  .brand span { display: none; }
  .clock { padding: 3px 10px; }
  .stats { order: 3; }
  .stat:not(.budget) { display: none; }
  .actions { order: 4; margin-left: auto; gap: 6px; }
  .actions button { padding: 7px 10px; font-size: 12.5px; }
  .full { display: none; } .short { display: inline; }
  #notice { font-size: 12px; padding: 6px 10px; }
  #feed { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; height: 34%; border-radius: 18px; transition: height .35s cubic-bezier(.2, .9, .3, 1); }
  #feed.min { height: 58px; }
  .feedHead { cursor: pointer; }
  .feedHead::after { content: "Tap to open"; position: absolute; right: 16px; top: 16px; font-size: 11px; color: var(--ink2); }
  #feed:not(.min) .feedHead::after { content: "Tap to close"; }
  .feedHead span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
  #drawer { left: 10px; right: 10px; width: auto; bottom: 10px; }
  #floors { top: auto; bottom: calc(var(--feedH, 58px) + 18px); left: 10px; right: 10px; transform: none; flex-direction: row; overflow-x: auto; max-height: none; gap: 6px; }
  #floors button { min-width: auto; flex: none; padding: 7px 10px; }
  #floors button small { display: none; }
  .bubble { max-width: 180px; font-size: 11.5px; padding: 7px 10px; }
  .tag { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .bubble, .msg, #drawer, #loading .mark, .tag.phase-blocked { animation: none; } }

/* staff panel */
.pill { display: inline-block; padding: 0 6px; border-radius: 9px; background: var(--paper); font: 600 11px/18px var(--mono); }
.bulk { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 4px; }
.bulk button { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12px; }
.roster { display: grid; gap: 2px; }
.roster .row { display: grid; grid-template-columns: 10px 1fr auto 40px; gap: 10px; align-items: center; padding: 7px 6px; border-radius: 10px; }
.roster .row:hover { background: var(--paper); }
.roster .row i { width: 10px; height: 10px; border-radius: 50%; }
.roster .row.off { opacity: .55; }
.roster .who { margin: 0; text-align: left; color: var(--ink); font-weight: 700; font-size: 13px; display: flex; flex-direction: column; }
.roster .who small { color: var(--ink2); font-weight: 500; font-size: 11.5px; }
.roster .st { color: var(--ink2); font-size: 11.5px; white-space: nowrap; }
.sw { position: relative; width: 38px; height: 22px; display: inline-block; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; border-radius: 22px; background: #cfd2d8; transition: background .2s; cursor: pointer; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.3,1.3,.5,1); }
.sw input:checked + span { background: var(--ok); }
.sw input:checked + span::after { transform: translateX(16px); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* short spoken lines (not chats) */
.say { position: absolute; left: -14px; bottom: 4px; width: max-content; max-width: 210px; padding: 5px 10px; border-radius: 12px 12px 12px 3px; background: rgba(26, 29, 38, .86); color: #fff; font: 600 11.5px/1.35 var(--display); box-shadow: 0 6px 16px rgba(0,0,0,.18); transform-origin: 14px 100%; animation: pop .3s cubic-bezier(.2, 1.3, .4, 1); }
/* Auto / In / Out */
.roster .row { grid-template-columns: 10px 1fr auto auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 4px 8px; font-size: 11px; font-weight: 700; color: var(--ink2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.ev { font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.ev summary { cursor: pointer; font-weight: 700; color: var(--ink); }
@media (max-width: 900px) { .say { max-width: 160px; font-size: 10.5px; } .roster .row { grid-template-columns: 10px 1fr auto; } .roster .st { display: none; } }

.clock.weather { flex-direction: row; align-items: center; gap: 7px; }
.clock.weather svg { width: 22px; height: 22px; flex: none; }
.clock.weather span { display: flex; flex-direction: column; align-items: flex-start; }
.clock.weather b { font: 700 13px var(--display); }
@media (max-width: 900px) { .clock.weather small { display: none; } }
.tag.partner { background: #00704a; color: #fff; }

/* scenes around the office and Coco's recording badge */
.chatHead.scene b { color: #c8406e; }
.msg.scene p { font-size: 12.5px; color: #3a3d47; }
.tag.rec::after { content: "● REC"; margin-left: 6px; color: #e53935; font-weight: 800; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------------- Desks and Studio */
#drawer.wide { width: 540px; }
#drawerBody .tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; position: sticky; top: -22px; background: #fffefc; padding: 8px 0; z-index: 1; }
#drawerBody .tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 12.5px; display: inline-flex; gap: 5px; align-items: center; }
#drawerBody .tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#drawerBody .lead { background: var(--paper); border-radius: 14px; padding: 12px 14px; font-size: 13px; margin: 8px 0; }
#drawerBody .lead .run, .dcard .run { display: block; margin-top: 8px; }
#drawerBody button.run { border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 10px; padding: 6px 12px; font-weight: 600; font-size: 12px; }
#drawerBody button.run:disabled { opacity: .6; }
#drawerBody .wait { background: #fff6e8; border: 1px solid #f1d9b0; color: #7a5520; border-radius: 12px; padding: 9px 12px; font-size: 12.5px; margin: 8px 0; }
#drawerBody .kpi { font-size: 13px; color: var(--ink2); }
#drawerBody .kpi b { color: var(--ink); font-family: var(--mono); }
.pcard, .ccard, .rule, .memo { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.pcard.approved, .pcard.rejected, .pcard.done { opacity: .72; }
.pcard h4, .ccard h4, .rule h4, .memo h4 { margin: 6px 0 4px; font-size: 14.5px; line-height: 1.3; }
.pcard p, .ccard p, .rule p, .memo p { margin: 4px 0; font-size: 13px; }
.pcard .impact { color: var(--ink2); }
.pcard details summary, .iv summary { cursor: pointer; font-size: 12.5px; color: var(--ink2); font-weight: 600; margin-top: 4px; }
.pcard .detail, .memo .detail { white-space: normal; color: var(--ink2); font-size: 12.5px; }
.phead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--ink2); }
.phead .dk { font-weight: 600; }
.phead .when { margin-left: auto; }
.kd { padding: 1px 8px; border-radius: 999px; background: var(--paper); font-weight: 600; color: var(--ink); }
.kd.k-incident, .kd.k-risk { background: #fde7e4; color: #9b2c22; }
.kd.k-cost { background: #e4f4ea; color: #1b6b45; }
.kd.k-linkup, .kd.k-upsell { background: #e7ecfb; color: #2f4aa0; }
.kd.k-solution, .kd.k-product, .kd.k-skill { background: #e3f4f6; color: #0b6b78; }
.kd.k-coaching { background: #fbe7f0; color: #9b1b55; }
.kd.fmt { background: #1a1d26; color: #fff; }
.ef { font-family: var(--mono); }
.rank { font-size: 12px; background: #f3efe6; border-radius: 10px; padding: 5px 9px; margin-top: 6px; }
.rank b { font-family: var(--mono); }
button.who { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--display); color: var(--ink); cursor: pointer; }
button.who i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.ppl { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.ppl .all { font-size: 12px; color: var(--ink2); }
.pfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin-top: 8px; }
.pfoot .btns { display: flex; gap: 6px; margin-left: auto; }
.pfoot .btns button { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12.5px; }
.pfoot .btns .yes, .pfoot .btns .post { background: var(--ok); color: #fff; border-color: var(--ok); }
.pfoot .btns .post:disabled { background: #cfd6d2; border-color: #cfd6d2; }
.pfoot .state { font: 600 11px var(--mono); text-transform: uppercase; color: var(--ink2); }
.pfoot .state.approved { color: var(--ok); } .pfoot .state.rejected { color: var(--bad); }
.cleared { font-size: 11.5px; color: var(--ok); font-weight: 600; }
.cleared.muted { color: var(--ink2); }
.flag { font-size: 12px; color: #9b2c22; background: #fde7e4; border-radius: 10px; padding: 5px 9px; }
.memo { background: #1a1d26; color: #f4f2ee; border: 0; }
.memo small { color: #c9a45c; font-weight: 600; letter-spacing: .04em; }
.memo .detail { color: #c9c6bd; }
.iv { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.iv p { font-size: 12.5px; margin: 5px 0; }
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dcard { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.dcard b { font-size: 13px; }
.dcard p { margin: 0; font-size: 12px; color: var(--ink2); }
.dcard small { font-size: 11px; color: var(--ink2); }
.dcard small.bad, em.bad { color: var(--bad); font-style: normal; }
table.sys { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.sys th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.sys td { padding: 6px 4px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
table.sys td:first-child { font-family: var(--display); }
.ccard blockquote { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: #fbf5f1; font-weight: 600; font-size: 13.5px; border-radius: 0 10px 10px 0; }
.ccard video { width: 100%; max-height: 420px; border-radius: 12px; background: #000; margin: 6px 0; }
.postsheet { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #f6f1e8; font-size: 13px; }
.postsheet ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.postsheet input { width: 100%; margin: 6px 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.btnlink { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--ink, #141313); color: #fff; text-decoration: none; font-weight: 700; }
.metrics { margin: 8px 0; padding: 10px 12px; border-radius: 14px; background: #f6f1e8; font-size: 12.5px; }
.metrics .mrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; margin: 8px 0 4px; }
.metrics label { display: grid; gap: 2px; font-size: 11px; text-transform: capitalize; color: #6f6758; }
.metrics input { width: 78px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.pillars { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.pillars span { padding: 4px 10px; border-radius: 999px; background: #f3efe8; font-size: 12px; }
.pillars span.on { background: #141313; color: #fff; }
table.beats { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12.5px; }
table.beats td { border-top: 1px solid var(--line); padding: 5px 4px; vertical-align: top; }
table.beats td.t { font-family: var(--mono); color: var(--ink2); white-space: nowrap; width: 52px; }
.ccard .cap { white-space: pre-line; }
.ccard .tags { color: #2f4aa0; font-size: 12.5px; }
.ccard .meta { color: var(--ink2); font-size: 12px; }
@media (max-width: 900px) { #drawer.wide { width: auto; left: 10px; right: 10px; } .team { grid-template-columns: 1fr; } }
.rank.a-approved { background: #e4f4ea; } .rank.a-declined { background: #fde7e4; } .rank.a-pending { background: #f3efe6; color: var(--ink2); }
.launch { font-size: 12px; color: var(--ink2); margin: 8px 0 0; } .launch a { color: #2f4aa0; font-weight: 600; }
details.fold { margin-top: 14px; } details.fold summary { cursor: pointer; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); font-weight: 600; }
.dday { color: var(--ink2); font-size: 11.5px; }

.dtick { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.dtick input { accent-color: var(--ok); width: 15px; height: 15px; margin: 0; }
.roster .row { grid-template-columns: 10px 1fr auto auto auto; }
.ccard .twist { font-size: 12.5px; background: #fbf5f1; border-radius: 8px; padding: 6px 9px; }
.ccard h4 a { color: inherit; }
@media (max-width: 900px) { .roster .row { grid-template-columns: 10px 1fr auto auto; } .dtick span { display: none; } }
.roster .who { align-items: flex-start; }

.brief { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--paper); }
.brief .bhead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.brief .bhead button { margin-left: auto; border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 9px; padding: 5px 10px; font-weight: 600; font-size: 12px; }
.brief .bhead .donebtn { margin-left: 0; background: #fff; color: var(--ink); }
.brief pre { white-space: pre-wrap; font: 12px/1.45 var(--mono); max-height: 320px; overflow: auto; margin: 6px 0 0; }

.rhead { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink2); margin: 6px 0 4px; }
.report { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fff; margin: 8px 0; }
.report > small { color: var(--ink2); font-weight: 600; font-size: 11.5px; }
.rsum { font-size: 14px; font-weight: 600; margin: 6px 0 10px; line-height: 1.45; }
.md h4 { font-size: 14px; margin: 14px 0 6px; } .md h3 { font-size: 15px; margin: 14px 0 6px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.md p, .md li { font-size: 13px; line-height: 1.5; } .md ul, .md ol { padding-left: 18px; margin: 4px 0; }
.md code { font: 11.5px var(--mono); background: var(--paper); padding: 1px 4px; border-radius: 4px; }
.md a { color: #2f4aa0; font-weight: 600; }
.tw { overflow-x: auto; margin: 6px 0; }
table.rep { border-collapse: collapse; width: 100%; font-size: 12px; }
table.rep th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); padding: 5px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.rep td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pinline { margin: 8px 0; }

.report.budget input { width: 70px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; font: 600 13px var(--mono); }
.report.budget small { color: var(--ink2); font-size: 11.5px; }
.report.budget .bar { display: block; height: 4px; border-radius: 2px; background: var(--line); margin-top: 4px; overflow: hidden; width: 80px; }
.report.budget .bar em { display: block; height: 100%; }
.capbtns { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.rule .btns { display: flex; gap: 6px; margin-top: 6px; }
.rule .btns button { padding: 5px 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12px; }
.rule .btns .yes { background: var(--ok); color: #fff; border-color: var(--ok); }
.scopeBox { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 6px; }
.scopeBox .dgrp { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.scopeBox .dept { flex-basis: 100%; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }
.chk small { color: var(--ink2); font-size: 11px; }
.ppl > small { color: var(--ink2); font-size: 11.5px; }

/* lobby radio: a small now-playing card while the ground floor is on screen */
#radio { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 16px; background: rgba(20, 22, 28, .86); color: #f4f2ee; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); backdrop-filter: blur(10px); }
#radio[hidden] { display: none !important; }
#radio .rvid { width: 112px; height: 63px; border-radius: 10px; overflow: hidden; background: #000; flex: none; }
#radio .rvid iframe { width: 112px; height: 63px; pointer-events: none; }
#radio .rmeta { display: flex; flex-direction: column; min-width: 0; max-width: 220px; }
#radio .rmeta small { color: #c9a45c; font-weight: 700; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
#radio .rmeta small::before { content: "● "; color: #ff4d4d; }
#radio .rmeta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#radio .rmeta span { font-size: 11.5px; color: #a9adb6; }
#radio button { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none; }
@media (max-width: 900px) { #radio { bottom: auto; top: calc(var(--topH, 96px) + 4px); } #radio .rvid, #radio .rvid iframe { width: 80px; height: 45px; } #radio .rmeta { max-width: 150px; } }

/* alerts */
.alertsBtn.hot { border-color: var(--bad) !important; color: var(--bad); }
.badge.red { background: var(--bad); }
.alert { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border-radius: 14px; padding: 11px 13px; margin-bottom: 8px; border: 1px solid var(--line); border-left: 5px solid #e3a33b; background: #fffaf0; }
.alert.red { border-left-color: var(--bad); background: #fff3f1; }
.alert b { font-size: 13.5px; } .alert p { margin: 3px 0; font-size: 12.5px; color: var(--ink2); } .alert small { font-size: 11.5px; color: var(--ink2); display: flex; gap: 6px; align-items: center; }
.alert button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 10px; font-weight: 600; font-size: 12px; }
.allclear { background: #eef8f2; color: #1b6b45; border-radius: 12px; padding: 12px 14px; font-weight: 600; }
td.warn { color: #b7791f; font-weight: 600; } td.bad { color: var(--bad); font-weight: 700; }
table.sys button { border: 0; background: none; color: var(--ink2); cursor: pointer; }
.addc { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 10px; }
.addc input, .addc select, .noteBox select, .noteBox textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; font: 13px var(--display); margin: 4px 0; }
.rgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.botpick { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0; max-height: 160px; overflow: auto; }
/* outcomes */
.outcome { font-size: 12.5px; margin: 8px 0 0; padding: 7px 10px; border-radius: 10px; background: var(--paper); color: var(--ink2); }
.outcome.worked { background: #eef8f2; color: #1b6b45; } .outcome.worse { background: #fff3f1; color: #9b2c22; }
.obtns { display: inline-flex; gap: 6px; margin-left: 6px; } .obtns button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.rok { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--paper); margin-left: 6px; } .rok.worked { background: #eef8f2; color: #1b6b45; } .rok.worse { background: #fff3f1; color: #9b2c22; }
/* clients */
.client { border-top: 1px solid var(--line); padding: 10px 0; } .crow { display: flex; justify-content: space-between; gap: 8px; } .cscore { font: 600 12.5px var(--mono); color: var(--ink2); }
.client .fb { font-size: 12.5px; margin: 4px 0; } .client .fb small { color: var(--ink2); }
.client .btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; } .client .btns button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 10px; font-weight: 600; font-size: 12px; }
.noteBox .yes { background: var(--ok); color: #fff; border: 0; border-radius: 9px; padding: 6px 12px; font-weight: 600; }

/* Vince's photo walks (Studio > Photos) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pgrid a { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 9 / 16; background: #1a1918; color: inherit; text-decoration: none; }
.pgrid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.pgrid a:hover img { transform: scale(1.03); }
.pgrid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px; font-size: 11.5px; line-height: 1.3; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.pgrid i { display: block; font-style: normal; opacity: .7; margin-top: 2px; }
.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-switch button { border: 0; background: transparent; padding: 6px 8px; font-weight: 600; }
.lang-switch button.on { font-weight: 800; text-decoration: underline; }
.tag.replay-on { outline: 2px solid var(--accent); background: #fff; }
.tag.phase-planning { box-shadow: 0 0 0 2px #6d5ef5; }
.tag.phase-coding { box-shadow: 0 0 0 2px #2f6fed; }
.tag.phase-debugging { box-shadow: 0 0 0 2px #d97706; }
.tag.phase-testing { box-shadow: 0 0 0 2px #1f9d6b; }
.tag.phase-reviewing { box-shadow: 0 0 0 2px #c9a45c; }
.tag.phase-publishing { box-shadow: 0 0 0 2px #0f766e; }
.tag.phase-blocked { box-shadow: 0 0 0 2px #c8463b; animation: stuckPulse 1.6s ease-in-out infinite; }
.tag.phase-completed { box-shadow: 0 0 0 2px #1f9d6b; }
.tag.phase-hold { filter: grayscale(0.45); box-shadow: 0 0 0 2px #8a8175; }
@keyframes stuckPulse { 50% { box-shadow: 0 0 0 3px #e07060; } }
#loading #loadBar { display: block; height: 4px; margin-top: 14px; width: 0; border-radius: 99px; background: #c9a45c; transition: width .25s ease; }
#furnBar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(20,24,40,.16); font: 600 12px/1 var(--display, sans-serif); }
#furnBar i { width: 120px; height: 4px; border-radius: 99px; background: #e7e1d6; position: relative; overflow: hidden; }
#furnBar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: #c9a45c; }
.board-goal, .board-repo { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line, #e4e0d8); border-radius: 12px; }
.board-goal h4, .board-repo h4, .board-repo h5 { margin: 8px 0 4px; }
.board-list { list-style: none; padding: 0; }
.board-list > li { margin: 0 0 12px; }
.credits { margin: 0; padding-left: 18px; }
.credits li { margin: 0 0 8px; }
.tag.phase-devicetask { box-shadow: 0 0 0 2px #2f6fed; }
.tag.phase-deviceconnected { box-shadow: 0 0 0 2px #0f766e; }
.tag.phase-operating { box-shadow: 0 0 0 2px #d97706; }
.tag.phase-waitingforhuman { box-shadow: 0 0 0 2px #c9a45c; }
.tag.phase-deviceoffline { box-shadow: 0 0 0 2px #c8463b; }
.tag.phase-observing { box-shadow: 0 0 0 2px #2f6fed; }
.tag.phase-deviceplanning { box-shadow: 0 0 0 2px #6d5ef5; }
.tag.phase-deviceoperating { box-shadow: 0 0 0 2px #d97706; }
.tag.phase-verifying { box-shadow: 0 0 0 2px #1f9d6b; }
.tag.phase-failed { box-shadow: 0 0 0 2px #c8463b; }
.tag.phase-paused { box-shadow: 0 0 0 2px #c9a45c; }
.replay-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.replay-bar select, #replayScrub { font: inherit; }
#replayLog p.on, #profileLog p { background: #fff; padding: 6px; margin: 4px 0; }
#replayDetail { background: #fff; padding: 8px; margin: 8px 0; }

/* layout editor — left side so it is not buried under the talk feed */
#layoutEditor {
  position: fixed; z-index: 14; top: calc(var(--topH, 72px) + 8px); left: 16px;
  width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 120px); overflow: auto;
  padding: 14px; border-radius: 16px; background: #fffefc; backdrop-filter: blur(14px);
  box-shadow: var(--shadow); border: 2px solid var(--accent, #c8623f); display: grid; gap: 10px;
}
#btnLayout.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#layoutEditor header { display: grid; gap: 2px; }
#layoutEditor header b { font-size: 15px; }
#layoutEditor header small, #layoutEditor .leHint { color: var(--ink2); font-size: 12px; margin: 0; }
#layoutEditor .row { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink2); }
#layoutEditor select { font: 13px var(--display); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
#layoutEditor .leActions { display: flex; flex-wrap: wrap; gap: 6px; }
#layoutEditor .leActions button {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; font-size: 12.5px;
}
#layoutEditor .leActions button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
#layoutEditor .leProps { display: grid; gap: 8px; padding: 8px 0 0; border-top: 1px dashed var(--line); }
#layoutEditor .leSizeBlock { display: grid; gap: 8px; }
#layoutEditor .leSizeHead {
  font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: 0.02em;
}
#layoutEditor .leFloorMeta {
  display: grid; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--line);
}
#layoutEditor .leFloorMeta input[type="text"] {
  font: 13px var(--display); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
#layoutEditor .leWallPick {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
#layoutEditor .leWallPick input[type="color"] {
  width: 44px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
#layoutEditor .leWallPick button {
  font: 12px var(--display); padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
#layoutEditor .leSurfacePick select {
  flex: 1 1 140px; min-width: 120px; font: 12.5px var(--display); padding: 7px 8px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
#layoutEditor .leSizeCustom, #layoutEditor .leImgRow { display: grid; gap: 6px; }
#layoutEditor .leSizeCustom { grid-template-columns: 1fr 1fr auto; align-items: end; }
#layoutEditor .leSizeCustom label, #layoutEditor .leImgRow .row { font-size: 11px; font-weight: 600; color: var(--ink2); display: grid; gap: 3px; }
#layoutEditor input[type="number"], #layoutEditor input[type="url"], #layoutEditor input[type="file"] {
  font: 12.5px var(--display); padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; width: 100%;
}
#layoutEditor .leSizeCustom button, #layoutEditor .leImgRow button {
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12px;
}
#layoutEditor .leList { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 180px; overflow: auto; }
#layoutEditor .leList li {
  padding: 7px 10px; border-radius: 10px; background: #fff; border: 1px solid transparent;
  font: 600 12px/1.3 var(--mono); cursor: pointer;
}
#layoutEditor .leList li.on { border-color: var(--accent); background: #fff8f4; }
@media (max-width: 900px) {
  #layoutEditor { left: 12px; right: 12px; width: auto; top: auto; bottom: calc(var(--feedH, 120px) + 12px); max-height: 42vh; border-width: 2px; }
}
