/* Bravyia OS: the 3D agent city. Sits over the Studio (VS Code) view; "Studio" in the sidebar switches back. */
#os { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-columns: 232px minmax(0,1fr); grid-template-rows: 54px minmax(0,1fr);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: #e8ecff; background: #070a24; }
#os[hidden] { display: none; }
#os.cozy { background: #f3e2c4; color: #2b2217; }
#os button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---- top bar: brand, agent chips, goal ---- */
.os-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: linear-gradient(180deg, rgba(20,26,90,.95), rgba(12,16,60,.9));
  border-bottom: 1px solid rgba(90,140,255,.35); box-shadow: 0 0 24px rgba(40,120,255,.25); overflow: hidden; }
#os.cozy .os-top { background: linear-gradient(180deg, #fff6e6, #f6e6c9); border-bottom-color: #d9b98a; box-shadow: none; }
.os-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; margin-right: 6px; }
.os-brand svg { width: 22px; height: 22px; }
.os-brand small { font-weight: 500; opacity: .6; }
.os-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 8px 0; }
.os-chip { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 9px; border-radius: 999px; background: rgba(40,60,170,.55); border: 1px solid rgba(110,160,255,.35);
  white-space: nowrap; line-height: 1.1; text-align: left; }
.os-chip:hover { border-color: #7fc4ff; }
.os-chip i { width: 8px; height: 8px; border-radius: 50%; background: #5dffb0; box-shadow: 0 0 8px currentColor; color: #5dffb0; flex: none; }
.os-chip i.idle { background: #ffd166; color: #ffd166; } .os-chip i.off { background: #7a84b8; color: #7a84b8; box-shadow: none; }
.os-chip b { display: block; font-size: 12.5px; }
.os-chip span { display: block; font-size: 10.5px; opacity: .7; font-family: "JetBrains Mono", Consolas, monospace; }
#os.cozy .os-chip { background: #fffaf0; border-color: #e0c9a3; }
.os-goal { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 190px; font-family: "JetBrains Mono", Consolas, monospace; }
.os-goal b { font-size: 15px; color: #7ff0ff; } #os.cozy .os-goal b { color: #1d6b4f; }
.os-goal small { font-size: 10.5px; opacity: .65; }
.os-bar { width: 180px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.os-bar > div { height: 100%; background: linear-gradient(90deg, #35e0ff, #b46bff); border-radius: 3px; }
#os.cozy .os-bar { background: #e8d6b6; } #os.cozy .os-bar > div { background: linear-gradient(90deg, #3aa56f, #9ccc65); }

/* ---- sidebar: workspaces ---- */
.os-side { background: rgba(10,14,52,.92); border-right: 1px solid rgba(90,140,255,.25); padding: 12px 10px; overflow-y: auto; }
#os.cozy .os-side { background: #fbf1df; border-right-color: #e0c9a3; }
.os-side h4 { margin: 6px 8px 8px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
.os-ws { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; text-align: left; }
.os-ws:hover { background: rgba(80,120,255,.18); } #os.cozy .os-ws:hover { background: #f1e0c2; }
.os-ws.on { background: linear-gradient(90deg, rgba(60,110,255,.45), rgba(150,80,255,.25)); box-shadow: inset 2px 0 0 #7fc4ff; }
#os.cozy .os-ws.on { background: #efd9b3; box-shadow: inset 2px 0 0 #c9853b; }
.os-ws em { font-style: normal; width: 20px; text-align: center; }
.os-ws small { margin-left: auto; font-family: "JetBrains Mono", Consolas, monospace; font-size: 10.5px; opacity: .6; }
.os-side .sep { height: 1px; background: rgba(120,150,255,.2); margin: 10px 6px; }
.os-theme { display: flex; gap: 6px; margin: 4px 6px; }
.os-theme button { flex: 1; padding: 6px; border-radius: 6px; font-size: 12px; border: 1px solid rgba(120,150,255,.3) !important; }
.os-theme button.on { background: rgba(80,130,255,.35); } #os.cozy .os-theme button { border-color: #d9b98a !important; } #os.cozy .os-theme button.on { background: #efd9b3; }

/* ---- stage: 3D city + labels ---- */
.os-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.os-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.os-stage canvas.drag { cursor: grabbing; }
.os-labels { position: absolute; inset: 0; pointer-events: none; }
.os-label { position: absolute; transform: translate(-6px, -100%); white-space: nowrap; pointer-events: auto; cursor: pointer; text-shadow: 0 1px 6px rgba(0,0,40,.9); }
.os-label b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.os-label b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7fe7ff; box-shadow: 0 0 8px #7fe7ff; }
.os-label span { display: block; margin-left: 13px; font-size: 10.5px; opacity: .75; border-top: 1px solid rgba(160,200,255,.4); padding-top: 2px; }
#os.cozy .os-label { text-shadow: 0 1px 4px rgba(255,248,230,.95); color: #2b2217; }
#os.cozy .os-label b::before { background: #e8a33c; box-shadow: 0 0 6px #e8a33c; }
.os-hint { position: absolute; left: 16px; bottom: 14px; font-size: 11.5px; opacity: .55; pointer-events: none; }
.os-float { position: absolute; right: 16px; bottom: 14px; display: flex; gap: 8px; }
.os-float button { padding: 8px 14px; border-radius: 8px; font-size: 13px; background: rgba(30,50,160,.7); border: 1px solid rgba(120,170,255,.45) !important; backdrop-filter: blur(6px); }
.os-float button:hover { border-color: #9fd6ff !important; }
#os.cozy .os-float button { background: #fffaf0; border-color: #d9b98a !important; }

/* ---- glass panels (Morning Brief, agent room) ---- */
.os-panel { position: absolute; inset: 14px; z-index: 5; overflow-y: auto; border-radius: 16px; padding: 22px 24px 26px;
  background: linear-gradient(160deg, rgba(24,44,170,.93), rgba(18,26,110,.95) 60%, rgba(60,20,120,.93)); border: 1px solid rgba(120,170,255,.45);
  box-shadow: 0 30px 80px rgba(0,0,30,.6), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(10px); }
.os-panel[hidden] { display: none; }
#os.cozy .os-panel { background: linear-gradient(160deg, #fffaf0, #f7ead2); border-color: #dfc394; box-shadow: 0 30px 80px rgba(80,50,10,.3); }
.os-close { position: absolute; top: 14px; right: 16px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12) !important; font-size: 15px; }
.os-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #7ff0ff; font-weight: 700; }
#os.cozy .os-kicker { color: #b3672a; }
.os-panel h2 { margin: 2px 0 2px; font: 800 32px/1.1 "Segoe UI", system-ui, sans-serif; letter-spacing: -.01em; }
.os-sub { margin: 0 0 18px; opacity: .8; font-size: 13.5px; }
.os-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 16px; }
.os-card { border-radius: 14px; padding: 16px 18px; background: rgba(20,40,150,.55); border: 1px solid rgba(120,170,255,.35); }
#os.cozy .os-card { background: #fffdf8; border-color: #e5cfa8; }
.os-card h3 { margin: 0 0 12px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.os-card h4 { font-size: 13px; }
/* form fields in rooms (reply helper, expenses) */
.os-in { box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(160,200,255,.45); background: rgba(0,0,40,.35); color: inherit; font: 14px/1.45 inherit; font-family: inherit; }
#os.cozy .os-in { background: #fffaf1; border-color: #d9c19a; }
.os-in:focus { outline: 2px solid #5ee7ff; outline-offset: 1px; }
/* storyboard review */
.os-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.os-frames figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.os-frames img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; display: block; background: #000; }
.os-frames figcaption { display: grid; gap: 4px; font-size: 12.5px; }
.os-frames figcaption span { opacity: .75; }
.os-frames figcaption em { font-style: normal; color: #ffd36b; }
.os-frames .btn { justify-self: start; }
@media (max-width: 520px) { .os-frames { grid-template-columns: repeat(2, 1fr); } }
/* design drop review */
.os-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.os-designs figure { margin: 0; display: grid; gap: 8px; align-content: start; }
.os-designs img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 10px; display: block; background: #fbf7ee; }
.os-designs figcaption { display: grid; gap: 4px; font-size: 13px; }
.os-designs figcaption span { opacity: .8; }
.os-designs figcaption small { opacity: .7; font-size: 12px; }
.os-designs figcaption em { font-style: normal; color: #ffd36b; }
.os-designs .os-go { margin-top: 4px; }
.os-money { display: flex; align-items: baseline; gap: 8px; font-family: "JetBrains Mono", Consolas, monospace; }
.os-money b { font-size: 34px; } .os-money span { opacity: .7; }
.os-money em { margin-left: auto; font-style: normal; color: #5dffd0; font-weight: 700; } #os.cozy .os-money em { color: #1d7a52; }
.os-progress { height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); margin: 10px 0 6px; overflow: hidden; }
.os-progress > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #26d7ff, #5dffd0); box-shadow: 0 0 14px rgba(60,230,255,.6); }
#os.cozy .os-progress { background: #eadcc2; } #os.cozy .os-progress > div { background: linear-gradient(90deg, #3aa56f, #9ccc65); box-shadow: none; }
.os-meta { display: flex; justify-content: space-between; font-size: 11.5px; opacity: .7; }
.os-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.os-kpi { border-radius: 10px; padding: 10px 12px; background: rgba(40,70,200,.45); border: 1px solid rgba(120,170,255,.3); }
#os.cozy .os-kpi { background: #fbf3e4; border-color: #e5cfa8; }
.os-kpi b { display: block; font: 700 22px "JetBrains Mono", Consolas, monospace; }
.os-kpi span { font-size: 11.5px; opacity: .8; }
.os-kpi i { display: block; font-style: normal; font-size: 10.5px; color: #5dffd0; margin-top: 2px; } #os.cozy .os-kpi i { color: #1d7a52; }
.os-time { display: grid; grid-template-columns: 64px 12px minmax(0,1fr); gap: 6px 8px; align-items: start; font-size: 13px; }
.os-time .t { font: 11px "JetBrains Mono", Consolas, monospace; opacity: .6; padding-top: 2px; }
.os-time .d { width: 8px; height: 8px; border-radius: 50%; background: #fff; margin-top: 5px; box-shadow: 0 0 8px rgba(255,255,255,.8); }
#os.cozy .os-time .d { background: #c9853b; box-shadow: none; }
.os-time .x b { font-weight: 700; } .os-time .x small { display: block; opacity: .7; font-size: 12px; }
.os-time .rule { grid-column: 1 / -1; height: 1px; background: rgba(140,170,255,.18); } #os.cozy .os-time .rule { background: #eadcc2; }
.os-wait { display: grid; gap: 10px; }
.os-item { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: rgba(30,55,180,.55); border: 1px solid rgba(120,170,255,.3); }
#os.cozy .os-item { background: #fbf3e4; border-color: #e5cfa8; }
.os-badge { font: 700 9.5px "JetBrains Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; border: 1px solid currentColor; color: #ffd36b; margin-top: 2px; }
.os-item .tt { font-weight: 700; font-size: 13px; line-height: 1.3; } .os-item .dd { font-size: 11.5px; opacity: .75; margin-top: 2px; }
.os-item .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
#os .os-item .acts .btn { font-size: 11.5px; padding: 4px 11px; border-radius: 6px; border: 1px solid rgba(160,200,255,.5); background: rgba(255,255,255,.08); color: inherit; }
#os .os-item .acts .btn.primary { background: #3ef2c0; color: #062a22; border-color: #3ef2c0; font-weight: 700; }
#os.cozy .os-item .acts .btn { border-color: #d9b98a; background: #fff; } #os.cozy .os-item .acts .btn.primary { background: #2f8f60; color: #fff; border-color: #2f8f60; }
.os-queue { display: grid; gap: 7px; font-size: 12.5px; }
.os-queue div { display: flex; gap: 8px; align-items: center; }
.os-tag { font: 700 9.5px "JetBrains Mono", Consolas, monospace; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; color: #0b0f33; flex: none; }
.os-crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.os-crew button { text-align: left; padding: 8px 10px; border-radius: 10px; background: rgba(30,55,180,.45) !important; border: 1px solid rgba(120,170,255,.28) !important; }
#os.cozy .os-crew button { background: #fbf3e4 !important; border-color: #e5cfa8 !important; }
.os-crew b { display: block; font-size: 13px; } .os-crew span { font-size: 11px; opacity: .7; }
.os-compiled { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 12px; margin-bottom: 14px; }
.os-empty { opacity: .6; font-size: 12.5px; padding: 6px 0; }

/* agent room */
.os-room { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 18px; }
.os-room img, .os-room .ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 14px; border: 1px solid rgba(160,200,255,.35); display: block; }
.os-room .ph { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(80,140,255,.4), rgba(20,20,80,.6)); font-size: 64px; }
/* room scene: looping video of the agent at work + a live chat bubble coming out of them */
.os-scene { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; border: 1px solid rgba(160,200,255,.35); background: #0b0f33 center/cover no-repeat; }
.os-scene video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.os-bubble { position: absolute; transform: translate(-8px, -100%); max-width: 46%; min-width: 120px; padding: 9px 12px; border-radius: 14px 14px 14px 4px;
  background: rgba(255,255,255,.96); color: #14173a; font: 12.5px/1.4 "Segoe UI", system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0,0,40,.45);
  opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.os-bubble.show { opacity: 1; transform: translate(-8px, calc(-100% - 6px)); }
.os-bubble::after { content: ""; position: absolute; left: 6px; bottom: -8px; border: 8px solid transparent; border-top-color: rgba(255,255,255,.96); border-left-color: rgba(255,255,255,.96); border-bottom: 0; border-right-width: 10px; }
.os-bubble b { display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.os-bubble .dots span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #7a7fa8; animation: osDot 1s infinite ease-in-out; }
.os-bubble .dots span:nth-child(2) { animation-delay: .15s; } .os-bubble .dots span:nth-child(3) { animation-delay: .3s; }
.os-bubble .caret { display: inline-block; width: 1px; height: 1em; background: #14173a; vertical-align: -2px; margin-left: 1px; animation: osCaret .8s steps(1) infinite; }
@keyframes osDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes osCaret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .os-bubble .dots span, .os-bubble .caret { animation: none; } }
.os-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.os-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.os-go button { padding: 8px 14px; border-radius: 8px; background: rgba(62,242,192,.18) !important; border: 1px solid rgba(62,242,192,.6) !important; font-size: 13px; }
#os.cozy .os-go button { background: #e7f3ea !important; border-color: #2f8f60 !important; }

/* ---- phone layout (#os.m, set by city.js under 760px): header, bottom tabs, full-screen pages ---- */
.m-head, .m-nav { display: none; }
#os.m { grid-template-columns: 1fr; grid-template-rows: calc(52px + env(safe-area-inset-top)) minmax(0, 1fr) calc(60px + env(safe-area-inset-bottom)); }
#os.m .os-top, #os.m .os-side, #os.m .os-float, #os.m .os-hint { display: none; }
#os.m .os-stage { grid-row: 2; grid-column: 1; min-height: 0; }
#os.m .m-head { display: flex; grid-row: 1; grid-column: 1; align-items: center; gap: 8px; padding: env(safe-area-inset-top) 10px 0 14px; background: rgba(12,16,60,.97); border-bottom: 1px solid rgba(90,140,255,.3); }
#os.m .m-nav { display: grid; grid-row: 3; grid-column: 1; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); background: rgba(10,14,50,.98); border-top: 1px solid rgba(90,140,255,.3); }
.m-brand { display: flex; align-items: center; gap: 8px; font-weight: 800 !important; font-size: 17px !important; }
.m-brand img { border-radius: 7px; }
.m-kept { margin-left: auto; font: 700 15px "JetBrains Mono", Consolas, monospace !important; color: #7ff0ff !important; padding: 8px 6px; }
.m-kept small { font: 500 11px "Segoe UI", system-ui, sans-serif; opacity: .7; color: #e8ecff; }
.m-dot { width: 40px; height: 40px; display: grid; place-items: center; }
.m-dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #3ef2c0; box-shadow: 0 0 10px #3ef2c0; }
.m-dot.warn::after { background: #ffd36b; box-shadow: 0 0 10px #ffd36b; } .m-dot.bad::after { background: #ff5f7a; box-shadow: 0 0 12px #ff5f7a; }
.m-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px !important; opacity: .65; min-height: 56px; }
.m-nav button em { font-style: normal; font-size: 21px; line-height: 1; }
.m-nav button.on { opacity: 1; color: #7ff0ff !important; font-weight: 700 !important; }
.m-nav button i { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #ff4d6d; color: #fff; font: 700 10.5px/16px "Segoe UI", system-ui, sans-serif; font-style: normal; text-align: center; }
#os.m .os-panel { inset: 0; border-radius: 0; border: 0; box-shadow: none; padding: 16px 16px 32px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#os.m .os-panel h2 { font-size: 25px; }
#os.m .os-close { top: 10px; right: 10px; width: 38px; height: 38px; }
.m-hello b { display: block; font-size: 22px; font-weight: 800; }
.m-hello span { font-size: 12.5px; opacity: .7; }
.m-money { display: block; width: 100%; text-align: left !important; margin: 14px 0 0; padding: 14px 16px !important; border-radius: 16px; background: rgba(20,40,150,.6) !important; border: 1px solid rgba(120,170,255,.4) !important; }
.m-money span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.m-money b { display: block; font: 700 32px "JetBrains Mono", Consolas, monospace; margin-top: 2px; }
.m-money small { font-size: 12px; opacity: .75; }
.m-banner { display: flex !important; justify-content: space-between; align-items: center; width: 100%; margin-top: 12px; padding: 14px 16px !important; border-radius: 14px; font-weight: 700 !important; font-size: 15px !important; text-align: left;
  background: linear-gradient(90deg, rgba(255,143,90,.3), rgba(180,107,255,.3)) !important; border: 1px solid rgba(255,179,122,.6) !important; }
.m-sec { margin-top: 18px; }
.m-sec h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.m-link { display: block; margin-top: 6px; padding: 8px 0 !important; color: #7ff0ff !important; font-weight: 700 !important; }
.m-health { display: flex !important; align-items: center; gap: 10px; width: 100%; margin-top: 16px; padding: 12px 14px !important; border-radius: 12px; text-align: left; font-size: 14px !important;
  background: rgba(30,55,180,.45) !important; border: 1px solid rgba(120,170,255,.3) !important; }
.m-health i { width: 10px; height: 10px; border-radius: 50%; background: #3ef2c0; box-shadow: 0 0 8px #3ef2c0; flex: none; }
.m-health.warn i { background: #ffd36b; box-shadow: 0 0 8px #ffd36b; } .m-health.bad i { background: #ff5f7a; box-shadow: 0 0 8px #ff5f7a; }
.m-health b, .m-banner b { margin-left: auto; }
.m-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.m-row { display: flex !important; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 11px 12px !important; border-radius: 12px; text-align: left; background: rgba(30,55,180,.5) !important; border: 1px solid rgba(120,170,255,.3) !important; }
.m-row .os-badge { margin: 0; flex: none; } .m-row b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row em { font-style: normal; font-size: 20px; opacity: .6; flex: none; }
#os.cozy .m-row { background: #fffdf8 !important; border-color: #e5cfa8 !important; }
.m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.m-tile { display: block; min-height: 84px; padding: 11px 10px !important; border-radius: 14px; text-align: left !important; background: rgba(30,55,180,.5) !important; border: 1px solid rgba(120,170,255,.32) !important; }
.m-tile:active, .m-money:active, .m-health:active, .m-banner:active { transform: scale(.98); }
.m-tile em { display: block; font-style: normal; font-size: 22px; margin-bottom: 4px; }
.m-tile b { display: block; font-size: 13.5px; line-height: 1.2; } .m-tile span { display: block; font-size: 11.5px; opacity: .75; margin-top: 2px; line-height: 1.25; }
.m-feed > div { padding: 9px 0; border-bottom: 1px solid rgba(140,170,255,.18); font-size: 13.5px; line-height: 1.4; }
.m-feed small { display: block; opacity: .6; font-size: 11.5px; margin-top: 2px; }
.m-add { display: flex; gap: 8px; margin-top: 16px; }
.m-add input { flex: 1; min-width: 0; }
.m-add button { padding: 0 18px !important; border-radius: 10px; background: #3ef2c0 !important; color: #062a22 !important; font-weight: 700 !important; }
.m-theme { margin: 0; } .m-theme button { padding: 10px !important; }
#os.m .m-roomhead h2 { font-size: 24px; }
#os.m .os-scene { aspect-ratio: auto; height: 150px; margin-top: 10px; }
#os.m .os-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#os.m .os-stats .os-kpi { padding: 8px 8px; } #os.m .os-stats .os-kpi b { font-size: 16px; } #os.m .os-stats .os-kpi span { font-size: 10.5px; line-height: 1.2; display: block; }
.m-fold summary { cursor: pointer; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; list-style: none; padding: 2px 0; }
.m-fold summary::-webkit-details-marker { display: none; }
.m-fold summary::before { content: "▸ "; } .m-fold[open] summary::before { content: "▾ "; } .m-fold[open] summary { margin-bottom: 12px; }
#os.m .os-item .acts .btn { font-size: 13px; padding: 8px 14px; }
#os.m .os-go button { padding: 10px 14px; }
#os.m .os-designs { grid-template-columns: 1fr; }
/* phone, summer theme */
#os.cozy.m .m-head, #os.cozy.m .m-nav { background: #fff6e6; border-color: #d9b98a; }
#os.cozy .m-tile, #os.cozy .m-money, #os.cozy .m-health { background: #fffdf8 !important; border-color: #e5cfa8 !important; }
#os.cozy .m-kept, #os.cozy .m-nav button.on, #os.cozy .m-link { color: #1d6b4f !important; } #os.cozy .m-kept small { color: #2b2217; }

@media (max-width: 900px) {
  #os { grid-template-columns: 1fr; grid-template-rows: 54px auto minmax(0,1fr); }
  .os-side { display: flex; gap: 6px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid rgba(90,140,255,.25); scrollbar-width: none; }
  #osWs { display: flex; gap: 6px; }
  .os-stage { min-height: 70vh; }
  .os-bubble { font-size: 11px; max-width: 60%; }
  .os-side h4, .os-side .sep, .os-theme { display: none; }
  .os-ws { width: auto; white-space: nowrap; }
  .os-goal { display: none; }
  .os-grid, .os-room { grid-template-columns: 1fr; }
  .os-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* =====================================================================================
   Bravyia OS design system v2: dark glass surfaces, one accent, colour per crew member.
   Placed last so it restyles every screen; the Summer day theme (#os.cozy) still wins.
   ===================================================================================== */
#os { --ink: #06081a; --glass: rgba(10,13,34,.84); --surf: rgba(255,255,255,.045); --surf2: rgba(255,255,255,.075); --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16);
  --text: #eef1ff; --muted: rgba(226,232,255,.62); --accent: #5ee7ff; --accent2: #a78bfa; --good: #3ef2c0; --warn: #ffd36b; --bad: #ff5f7a;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--text); background: var(--ink); -webkit-font-smoothing: antialiased; }
#os:not(.cozy) .os-top { background: rgba(8,11,30,.82); border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(16px); }
#os:not(.cozy) .os-side { background: rgba(8,11,30,.88); border-right: 1px solid var(--line); }
#os:not(.cozy) .os-chip { background: var(--surf); border-color: var(--line); }
#os:not(.cozy) .os-ws.on { background: var(--surf2); box-shadow: inset 3px 0 0 var(--accent); }
#os:not(.cozy) .os-ws:hover { background: var(--surf); }
/* panels + cards */
#os:not(.cozy) .os-panel { background: var(--glass); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0,0,0,.55); backdrop-filter: blur(22px) saturate(1.25); -webkit-backdrop-filter: blur(22px) saturate(1.25); }
#os:not(.cozy) .os-card { background: var(--surf); border: 1px solid var(--line); border-radius: 16px; }
#os .os-card h3, #os .m-sec h3 { color: var(--muted); opacity: 1; font-weight: 700; letter-spacing: .14em; }
#os:not(.cozy) .os-kpi { background: var(--surf2); border: 1px solid var(--line); border-radius: 12px; }
#os:not(.cozy) .os-kpi span { color: var(--muted); opacity: 1; }
#os:not(.cozy) .os-item { background: var(--surf); border: 1px solid var(--line); border-radius: 12px; }
#os .os-sub { color: var(--muted); opacity: 1; }
#os .os-kicker { color: var(--accent); }
#os:not(.cozy) .os-close { background: var(--surf2) !important; border: 1px solid var(--line) !important; }
#os:not(.cozy) .os-go button { background: rgba(94,231,255,.1) !important; border: 1px solid rgba(94,231,255,.45) !important; border-radius: 10px; font-weight: 600; }
#os:not(.cozy) .os-go button:hover { background: rgba(94,231,255,.18) !important; }
#os:not(.cozy) .os-go button:first-child { background: linear-gradient(135deg, #5ee7ff, #a78bfa) !important; color: #06081a !important; border-color: transparent !important; }
#os:not(.cozy) .os-go .btn { background: var(--surf2) !important; color: var(--text) !important; border: 1px solid var(--line2) !important; }
#os .os-item .acts .btn.primary { background: var(--good); border-color: var(--good); }
#os:not(.cozy) .os-in { background: rgba(0,0,0,.28); border-color: var(--line2); }
#os:not(.cozy) .os-progress { background: rgba(255,255,255,.08); }
#os:not(.cozy) .os-progress > div { background: linear-gradient(90deg, #5ee7ff, #a78bfa); box-shadow: 0 0 16px rgba(94,231,255,.45); }
#os:not(.cozy) .os-scene { border-color: var(--line2); border-radius: 16px; }
#os:not(.cozy) .os-time .rule { background: var(--line); }
#os .os-panel::-webkit-scrollbar { width: 6px; } #os .os-panel::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }

/* phone chrome: frosted header + tab bar with a pill for the active tab */
#os.m:not(.cozy) .m-head { background: rgba(8,11,30,.78); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
#os.m:not(.cozy) .m-nav { background: rgba(8,11,30,.86); border-top: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
#os.m .m-head, #os.m .m-nav { position: relative; z-index: 8; }
.m-nav button em { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s ease; }
#os:not(.cozy) .m-nav button.on em { background: rgba(94,231,255,.16); }
#os:not(.cozy) .m-nav button.on { color: var(--accent) !important; }
.m-nav button i { box-shadow: 0 0 0 2px #06081a; }
#os .m-theme { display: flex; }

/* Home: live 3D city as the header, content slides up over it */
#os.m.hero .os-stage canvas { height: 250px; bottom: auto; }
#os.m.hero #osHome { background: transparent !important; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; border: 0; }
.m-hero { position: relative; display: block; width: 100%; height: 250px; text-align: left !important; background: linear-gradient(180deg, rgba(6,8,26,0) 45%, rgba(6,8,26,.85)) !important; }
.m-hero-top { position: absolute; top: 12px; left: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(6,8,26,.62); border: 1px solid var(--line2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.m-hero-top i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); animation: mPulse 2s infinite; }
@keyframes mPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .m-hero-top i { animation: none; } }
.m-hero .m-hello { position: absolute; left: 16px; bottom: 16px; }
.m-hero .m-hello b { font-size: 25px; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.m-hero .m-hello span { color: var(--text); opacity: .8; }
.m-hero-cta { position: absolute; right: 14px; bottom: 18px; padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #06081a; background: linear-gradient(135deg, #5ee7ff, #a78bfa); box-shadow: 0 8px 24px rgba(94,231,255,.35); }
.m-body { position: relative; margin-top: -8px; padding: 16px 16px 32px; min-height: calc(100% - 242px); border-radius: 20px 20px 0 0; background: #070a1d; border-top: 1px solid var(--line2); }
#os.cozy .m-body { background: #fbf1df; border-color: #e0c9a3; }
#os.cozy .m-hero { background: linear-gradient(180deg, rgba(251,241,223,0) 45%, rgba(251,241,223,.9)) !important; }
#os.cozy .m-hero-top { background: rgba(255,250,240,.8); border-color: #e0c9a3; }
#os.cozy .m-hero .m-hello b, #os.cozy .m-hero .m-hello span { color: #2b2217; text-shadow: none; }

/* Home + More widgets */
#os:not(.cozy) .m-money { background: linear-gradient(145deg, rgba(94,231,255,.10), rgba(167,139,250,.10)) !important; border: 1px solid rgba(94,231,255,.28) !important; margin-top: 0; }
.m-money b { letter-spacing: -.02em; }
#os:not(.cozy) .m-banner { background: linear-gradient(90deg, rgba(255,143,90,.18), rgba(167,139,250,.18)) !important; border-color: rgba(255,179,122,.45) !important; }
#os:not(.cozy) .m-row, #os:not(.cozy) .m-health { background: var(--surf) !important; border: 1px solid var(--line) !important; }
.m-tile { position: relative; overflow: hidden; }
#os:not(.cozy) .m-tile { background: var(--surf) !important; border: 1px solid var(--line) !important; }
.m-tile em { display: grid !important; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-size: 19px !important; margin-bottom: 8px !important;
  background: color-mix(in srgb, var(--c, #5ee7ff) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #5ee7ff) 40%, transparent); }
.m-tile::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c, #5ee7ff); opacity: .7; }
.m-tile span { color: var(--muted); opacity: 1 !important; }
.m-feed > div { border-bottom-color: var(--line) !important; padding-left: 12px !important; position: relative; }
.m-feed > div::before { content: ""; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #5ee7ff); }
.m-feed b { color: var(--c, #5ee7ff); }
#os.cozy .m-tile em { background: color-mix(in srgb, var(--c, #c9853b) 18%, #fff); }
#os.m .os-panel { scrollbar-width: none; } #os.m .os-panel::-webkit-scrollbar { display: none; }
