/* OnDuhGo Twin — one dock runs the whole Twin (docs/departments-dock.md).
   The bottom dock holds every department; each department opens as a window with its animated scene on top and the
   Owner view's look below it. Brand colours and Baloo 2 only. Scoped under body.dp so nothing changes until depts.js runs. */

/* ---------------------------------------------------------------- the dock */
#dpDock{position:fixed;left:0;right:0;bottom:0;z-index:16;display:flex;align-items:stretch;gap:4px;height:76px;box-sizing:border-box;
  padding:6px 10px;background:rgba(43,33,24,.96);border-top:1px solid rgba(200,155,108,.35);
  font-family:"Baloo 2","Work Sans",system-ui,sans-serif;color:#F7E7C6;overflow-x:auto;scrollbar-width:none}
#dpDock::-webkit-scrollbar{display:none}
#dpDock[hidden]{display:none}
#dpDock .dpk{position:relative;flex:1 1 0;min-width:74px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  border:0;border-radius:14px;background:transparent;color:#F7E7C6;font:inherit;cursor:pointer;padding:4px 2px}
#dpDock .dpk:hover{background:rgba(200,155,108,.14)}
#dpDock .dpk:focus-visible{outline:2px solid #E38361;outline-offset:-2px}
#dpDock .dpk svg{width:24px;height:24px;flex:none}
#dpDock .dpk b{font-size:13px;font-weight:700;line-height:1.15;white-space:nowrap}
#dpDock .dpk small{font-size:11px;font-weight:600;color:rgba(247,231,198,.62);line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#dpDock .dpk[aria-pressed="true"]{background:#E38361;color:#2B2118}
#dpDock .dpk[aria-pressed="true"] small{color:#2B2118}
#dpDock .dpk .dpb{position:absolute;top:3px;right:calc(50% - 22px);min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#E38361;color:#2B2118;font-size:11px;font-weight:800;line-height:16px;text-align:center}
#dpDock .dpk[aria-pressed="true"] .dpb{background:#2B2118;color:#F7E7C6}
#dpDock .dpsep{flex:none;width:1px;background:rgba(200,155,108,.3);margin:8px 2px}
#dpDock .dpacct{flex:none;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:0 2px}
#dpDock .dpacct button{min-height:28px;padding:0 12px;border-radius:999px;border:1px solid rgba(200,155,108,.45);background:transparent;color:#F7E7C6;font:700 12px "Baloo 2","Work Sans",sans-serif;cursor:pointer}
#dpDock .dpacct button:hover{border-color:#E38361;color:#E38361}
#dpDock .dpacct button{position:relative}
#dpDock .dpacct button:focus-visible{outline:2px solid #E38361;outline-offset:2px}
#dpDock .dpacct .dpn{display:inline-block;margin-left:6px;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:#E38361;color:#2B2118;font-size:11px;font-weight:800;line-height:18px;text-align:center;vertical-align:1px}
/* Admin and Out stay in view at the dock's end however far it scrolls: notifications live inside Admin */
#dpDock .dpacct{position:sticky;right:-10px;z-index:1;margin-right:-10px;padding:0 10px 0 10px;background:#2B2118;box-shadow:-12px 0 14px -8px #2B2118}
html.m-ui.m-land #dpDock .dpacct{right:auto;bottom:0;margin-right:0;box-shadow:0 -12px 14px -8px #2B2118}

/* the old floating bars give way to the dock */
body.dp .navbar{display:none!important}
html:not(.m-ui) body.dp .ticker{bottom:76px}
html:not(.m-ui) body.dp .timeline{bottom:110px;right:14px}
html:not(.m-ui) body.dp .cards{bottom:150px}
body.dp.present #dpDock,body.dp.film #dpDock,body.dp.shorts #dpDock{display:none}

/* ----------------------------------------------------- department windows */
body.dp #modal,body.dp #drawer,body.dp #studio{
  --surface:#2B2118;--surface2:#3A2416;--ground:#3A2416;--text:#F7E7C6;--muted:rgba(247,231,198,.68);
  --line:rgba(200,155,108,.28);--line2:rgba(200,155,108,.55);--strong:#F7E7C6;--on:#2B2118}
html:not(.m-ui) body.dp #modal{bottom:76px;background:rgba(20,14,11,.55)}
body.dp #modal .sheet,body.dp #drawer{background:#2B2118;color:#F7E7C6;border:1px solid rgba(200,155,108,.45);border-radius:20px;
  box-shadow:0 18px 50px rgba(0,0,0,.5);font-family:"Baloo 2","Work Sans",system-ui,sans-serif;backdrop-filter:none;-webkit-backdrop-filter:none}
html:not(.m-ui) body.dp #modal .sheet{max-width:1080px;max-height:calc(100vh - 112px)}
html:not(.m-ui) body.dp #drawer{top:18px;bottom:94px;left:50%;right:auto;width:min(1080px,calc(100vw - 48px));transform:translateX(-50%);padding:16px 20px 24px}
body.dp #modal .sheet h2,body.dp #drawer h2{font-size:24px;font-weight:800;color:#F7E7C6;line-height:1.15}
body.dp #modal .dhead .sub,body.dp #drawer .sub{font-size:14px;color:rgba(247,231,198,.68)}
body.dp #modal #closeModal,body.dp #drawer #closeDrawer{width:40px;height:40px;padding:0;border-radius:12px;border:1px solid rgba(200,155,108,.45);background:transparent;color:#F7E7C6;font-size:20px}
body.dp #modal .invstage,body.dp .dpcamwrap{border:1px solid rgba(200,155,108,.4);border-radius:14px;overflow:hidden;background:#140e0b}
/* section chips */
body.dp #modal .invtabs,body.dp #modal .gtabs{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;padding:12px 0 4px;margin:0 0 6px;border:0;scrollbar-width:thin}
body.dp #modal .invtabs .btn,body.dp #modal .gtabs button{flex:none;min-height:40px;padding:0 16px;border-radius:999px;border:1.5px solid rgba(200,155,108,.5);
  background:#3A2416;color:#F7E7C6;font:600 15px "Baloo 2","Work Sans",sans-serif;box-shadow:none}
body.dp #modal .invtabs .btn[aria-pressed="true"],body.dp #modal .gtabs button[aria-pressed="true"]{background:#F7E7C6;color:#2B2118;border-color:#F7E7C6}
body.dp #modal .invtabs a.btn{display:inline-flex;align-items:center;text-decoration:none}
/* the overview chip owns the pressed look while it is on */
body.dp #sheet.dp-ovon .invtabs .btn[aria-pressed="true"]:not(.dp-ovchip){background:#3A2416;color:#F7E7C6;border-color:rgba(200,155,108,.5)}
body.dp #sheet.dp-ovon .invtabs .dp-ovchip{background:#F7E7C6;color:#2B2118;border-color:#F7E7C6}
body.dp #sheet.dp-ovon .invbody{display:none}
body.dp #sheet:not(.dp-ovon) .dpov{display:none}
/* cards, figures and buttons inside every window */
body.dp #modal .card,body.dp #modal .kpi,body.dp #drawer .card,body.dp #drawer .kpi,body.dp #studio .stsec{background:#3A2416;border:1px solid rgba(200,155,108,.32);border-radius:16px}
body.dp #modal .kpi b,body.dp #drawer .kpi b,body.dp #modal .card b,body.dp #drawer .card b{color:#F7E7C6}
body.dp #modal .btn,body.dp #drawer .btn{border-radius:12px;border:1.5px solid rgba(200,155,108,.5);background:transparent;color:#F7E7C6;font-family:"Baloo 2","Work Sans",sans-serif;font-weight:700}
body.dp #modal .btn:hover,body.dp #drawer .btn:hover{border-color:#E38361}
body.dp #modal .btn.primary,body.dp #drawer .btn.primary,body.dp #modal .btn.cta,body.dp #drawer .btn.cta{background:#E38361;border-color:#E38361;color:#2B2118}
body.dp #modal h3,body.dp #drawer h3{color:#C89B6C}
body.dp #modal select,body.dp #modal input,body.dp #modal textarea,body.dp #drawer select,body.dp #drawer input,body.dp #drawer textarea{background:#2B2118;color:#F7E7C6;border-color:rgba(200,155,108,.5)}
body.dp #modal .bar i,body.dp #drawer .bar i{background:#E38361}
/* one-home rule (docs/departments-dock.md, Karan's 14 merges): duplicates hidden, reachable from the overview */
body.dp [data-invtab="recipes"],body.dp [data-invtab="cost"],body.dp [data-otab="radar"],body.dp [data-otab="money"],body.dp #mktDrawer{display:none!important}

body.dp #toast{bottom:92px}
html.m-ui body.dp #toast{bottom:calc(var(--m-tabs) + env(safe-area-inset-bottom,0px) + 14px)!important}
/* the scene: a 4:3 frame on every device, as large as the window allows (up to 60% of the screen height). Rooms are
   wider than 4:3: the frame fills with the room's height and pans sideways; Full view fits the whole room. */
body.dp .dpstage{position:relative;width:min(100%,calc(60vh * 4 / 3));aspect-ratio:4/3;height:auto;margin:2px auto 4px;
  border:1px solid rgba(200,155,108,.4);border-radius:14px;overflow:hidden;background:#140e0b;display:block}
html.m-ui.m-land body.dp .dpstage{width:min(100%,calc(80vh * 4 / 3))}
body.dp .dpstage .dpscroll{position:absolute;inset:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(200,155,108,.5) transparent;
  overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;cursor:grab;outline:none}
body.dp .dpstage .dpscroll:focus-visible{box-shadow:inset 0 0 0 3px #E38361}
body.dp .dpstage.dpdrag .dpscroll,body.dp .dpcamwrap.dpdrag{cursor:grabbing;user-select:none}
body.dp .dpstage .dpscroll>canvas{display:block;height:100%;width:auto;max-width:none;aspect-ratio:320/150}
body.dp .dpstage.dpfit .dpscroll{display:flex;align-items:center;overflow:hidden}
body.dp .dpstage.dpfit .dpscroll>canvas{width:100%;height:auto}
body.dp .dpstage .invtip{z-index:3}
body.dp .dpstage .invup,body.dp .dpstage .invchips{z-index:4}
.dpcam{display:block;width:100%;height:100%;image-rendering:pixelated;image-rendering:crisp-edges;cursor:grab;touch-action:pan-y}
.dpctl{position:absolute;right:8px;bottom:8px;z-index:5;display:flex;gap:4px}
.dpctl button{min-width:40px;min-height:36px;padding:0 10px;border-radius:10px;border:1px solid rgba(200,155,108,.55);background:rgba(43,33,24,.86);color:#F7E7C6;font:700 13px "Baloo 2","Work Sans",sans-serif;cursor:pointer}
.dpctl button:hover{border-color:#E38361}
.dpctl button[aria-pressed="true"]{background:#F7E7C6;color:#2B2118}
body.dp .dpstage .invchips[style*="bottom"]{bottom:52px!important}


/* ------------------------------------------------- the Owner view's look */
.dpov{display:flex;flex-direction:column;gap:12px;padding:8px 0 4px;color:#F7E7C6;font:500 16px/1.5 "Baloo 2","Work Sans",system-ui,sans-serif}
.dpov .g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dpov .g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.dpov .g4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:760px){.dpov .g3,.dpov .g4{grid-template-columns:repeat(2,minmax(0,1fr))}.dpov .g2.st{grid-template-columns:1fr}}
.dpov .tile{display:block;text-align:left;border:0;border-radius:16px;padding:14px 16px;font:inherit;cursor:pointer;min-height:72px}
.dpov .tile b{display:block;font-size:20px;font-weight:800;line-height:1.2}
.dpov .tile span{font-size:14px;line-height:1.4}
.dpov .tile.pri{background:#E38361;color:#2B2118}
.dpov .tile.sec{background:#F7E7C6;color:#2B2118}
.dpov .tile.ter{background:#3A2416;color:#F7E7C6;border:1.5px solid rgba(200,155,108,.5)}
.dpov .tile:focus-visible,.dpov button:focus-visible{outline:3px solid #E38361;outline-offset:2px}
.dpov .pnl{background:#3A2416;border:1px solid rgba(200,155,108,.32);border-radius:16px;padding:14px 16px;min-width:0}
.dpov h4{margin:0 0 6px;font-size:19px;font-weight:700;color:#F7E7C6;letter-spacing:0;text-transform:none}
.dpov .mu{color:rgba(247,231,198,.68);font-size:14px}
.dpov .need{list-style:none;margin:0;padding:0}
.dpov .need li{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid rgba(200,155,108,.25)}
.dpov .need li:first-child{border-top:0}
.dpov .need i{width:10px;height:10px;border-radius:50%;background:#C89B6C;flex:none}
.dpov .need i.hot{background:#E38361}
.dpov .need div{flex:1;min-width:0}.dpov .need b{display:block;font-size:16px}.dpov .need span{font-size:14px;color:rgba(247,231,198,.68)}
.dpov .mini{flex:none;min-height:40px;padding:0 14px;border-radius:12px;border:1.5px solid rgba(200,155,108,.5);background:transparent;color:#F7E7C6;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.dpov .mini.acc{background:#E38361;border-color:#E38361;color:#2B2118}
.dpov .kp{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px}
.dpov .kp b{display:block;font-size:26px;font-weight:800;line-height:1.1}
.dpov .kp span{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(247,231,198,.62)}
.dpov .rank{list-style:none;margin:0;padding:0}
.dpov .rank li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:5px 0;font-size:15px}
.dpov .rank li b{font-weight:700}
.dpov .rank .rb{grid-column:1/-1;height:6px;border-radius:3px;background:rgba(247,231,198,.1);overflow:hidden}.dpov .rank .rb i{display:block;height:100%;background:#C89B6C}
.dpov .ord{list-style:none;margin:0;padding:0}
.dpov .ord li{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:10px;padding:7px 0;border-top:1px solid rgba(200,155,108,.22);font-size:15px}
.dpov .ord li:first-child{border-top:0}
.dpov .ord small{display:block;font-size:12px;color:rgba(247,231,198,.62)}
.dpov .find{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.dpov .find input{flex:1 1 200px;min-height:44px;border-radius:14px;border:2px solid rgba(200,155,108,.5);background:#2B2118;color:#F7E7C6;font:inherit;padding:0 14px}
.dpov .chip{flex:none;min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid rgba(200,155,108,.5);background:#2B2118;color:#F7E7C6;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
.dpov .chip[aria-pressed="true"]{background:#F7E7C6;color:#2B2118;border-color:#F7E7C6}
.dpov .items{list-style:none;margin:10px 0 0;padding:0}
.dpov .items li{display:grid;grid-template-columns:minmax(0,2fr) minmax(80px,1fr) minmax(90px,1.2fr);gap:10px;align-items:center;padding:8px 0;border-top:1px solid rgba(200,155,108,.22);font-size:15px}
.dpov .items li.e{display:block;color:rgba(247,231,198,.68)}
.dpov .items .lo{color:#E38361;font-weight:700}
.dpov .lvl{height:8px;border-radius:4px;background:rgba(247,231,198,.12);overflow:hidden}.dpov .lvl i{display:block;height:100%;background:#C89B6C}.dpov .lvl i.lo{background:#E38361}
.dpov .big{font-size:34px;font-weight:800;line-height:1.1}
.dpov .bars{display:flex;align-items:flex-end;gap:4px;height:90px;margin-top:10px;border-bottom:1px solid rgba(200,155,108,.4)}
.dpov .bars div{flex:1;background:#C89B6C;border-radius:4px 4px 0 0;min-height:2px}.dpov .bars div.t{background:#E38361}
.dpov .ax{display:flex;justify-content:space-between;font-size:12px;color:rgba(247,231,198,.62);margin-top:2px}
.dpov .ch{display:grid;grid-template-columns:100px minmax(0,1fr) 54px;gap:8px;align-items:center;font-size:15px;padding:3px 0}
.dpov .ch .b{height:12px;border-radius:0 4px 4px 0;background:#F7E7C6;min-width:2px}.dpov .ch span:last-child{text-align:right;font-weight:700}
.dpov .prog{height:10px;border-radius:5px;background:rgba(247,231,198,.12);overflow:hidden;margin:8px 0 4px}.dpov .prog i{display:block;height:100%;background:#E38361}
.dpov .post{padding:8px 0;border-top:1px solid rgba(200,155,108,.22)}.dpov .post:first-of-type{border-top:0}
.dpov .post b{display:block;font-size:15px;line-height:1.35}.dpov .post a{color:#E38361;font-weight:700}
.dpov .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.dpov .foot{font-size:12px;color:rgba(247,231,198,.55);text-align:center;margin:0}
.dpov .shop{display:flex;align-items:center;gap:10px}.dpov .shop i{width:12px;height:12px;border-radius:50%;background:#C89B6C;flex:none}.dpov .shop.on i{background:#E38361}
/* Richard's quick ask, at the top of his window */
.dpask{margin:6px 0 10px}
.dpask form{display:flex;gap:8px;align-items:center;background:#3A2416;border:2px solid rgba(200,155,108,.5);border-radius:16px;padding:4px 4px 4px 14px}
.dpask form:focus-within{border-color:#E38361}
.dpask input{flex:1;min-width:0;border:0!important;background:transparent!important;color:#F7E7C6;min-height:44px;font:500 17px "Baloo 2","Work Sans",sans-serif;outline:none}
.dpask .go{min-height:44px;padding:0 18px;border:0;border-radius:12px;background:#F7E7C6;color:#2B2118;font:700 16px "Baloo 2","Work Sans",sans-serif;cursor:pointer}
.dpask .sg{display:flex;gap:8px;overflow-x:auto;padding:8px 0 2px;scrollbar-width:none}
.dpask .sg button{flex:none;min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid rgba(200,155,108,.5);background:transparent;color:#F7E7C6;font:600 15px "Baloo 2","Work Sans",sans-serif;cursor:pointer}
.dpask .ans{margin-top:8px;background:#3A2416;border:1px solid rgba(200,155,108,.32);border-radius:16px;padding:12px 16px}
.dpask .ans .by{font-size:14px;font-weight:700;color:#C89B6C}.dpask .ans p{margin:2px 0 8px}

/* ------------------------------------------------ Twin Studio as a window */
html:not(.m-ui) body.dp.studio-open:not(.recap):not(.recording) .controls.toolbar.studio{left:50%;transform:translateX(-50%);bottom:94px;width:min(1080px,calc(100vw - 48px));
  max-height:calc(100vh - 112px);background:#2B2118;border:1px solid rgba(200,155,108,.45);border-radius:20px;padding:16px 20px 20px;gap:10px;backdrop-filter:none;box-shadow:0 18px 50px rgba(0,0,0,.5);z-index:17}
html:not(.m-ui) body.dp:is(.recap,.recording) .controls.toolbar.studio{bottom:110px}
body.dp:is(.recap,.recording) #studio .dpcamwrap,body.dp:is(.recap,.recording) #studio .stroom,body.dp:is(.recap,.recording) #studio .sthead span{display:none}
body.dp #studio .sthead b{font-size:24px}
body.dp #studio .stsec{padding:10px 12px}
body.dp #studio .stsec>i{color:#C89B6C}
body.dp #studio .btn,body.dp #studio .seg,body.dp #studio select{background:#2B2118;border-color:rgba(200,155,108,.5);border-radius:12px;color:#F7E7C6}
body.dp #studio .btn.cta,body.dp #studio .btn.primary{background:#E38361;border-color:#E38361;color:#2B2118}
body.dp #studio .seg button[aria-pressed="true"]{background:#F7E7C6;color:#2B2118}
body.dp #studio .recapgrp{background:transparent;border:0;padding:0}

/* ---------------------------------------------------------------- phones */
html.m-ui body.dp #mTabs,html.m-ui body.dp #mDepts{display:none!important}
html.m-ui #dpDock{height:calc(var(--m-tabs) + env(safe-area-inset-bottom,0px));padding:4px 4px env(safe-area-inset-bottom,0px);z-index:31;gap:2px}
html.m-ui #dpDock .dpk{flex:0 0 68px;min-width:68px}
html.m-ui #dpDock .dpk small{display:none}
html.m-ui #dpDock .dpacct{flex-direction:row;align-items:center}
html.m-ui #dpDock .dpacct button{min-height:40px}
html.m-ui.m-land #dpDock{top:0;bottom:0;left:auto;right:0;width:var(--m-rail);height:auto;flex-direction:column;overflow-x:hidden;overflow-y:auto;border-top:0;border-left:1px solid rgba(200,155,108,.35)}
html.m-ui.m-land #dpDock .dpk{flex:0 0 56px;min-width:0}
html.m-ui.m-land #dpDock .dpacct{flex-direction:column}
@media (prefers-reduced-motion:reduce){#dpDock .dpk{transition:none}}

/* the content plan inside Social (docs/content-app.md) */
.dpov .cst{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.03em;border-radius:999px;padding:1px 9px;margin-top:3px;background:#C89B6C;color:#2B2118}
.dpov .cst-idea{background:transparent;color:#F7E7C6;box-shadow:inset 0 0 0 1.5px rgba(200,155,108,.6)}
.dpov .cst-scripted{background:#F7E7C6}
.dpov .cst-shot{background:#DCBF96}
.dpov .cst-edited{background:#C89B6C}
.dpov .cst-scheduled{background:#8A5C3B;color:#F7E7C6}
.dpov .cst-published{background:#E38361;color:#2B2118}
.dpov .cladder{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
.dpov .cstep{display:grid;justify-items:center;gap:1px;padding:9px 2px;border-radius:12px;text-decoration:none;color:#F7E7C6;line-height:1.1;border:1px solid rgba(200,155,108,.32)}
.dpov .cstep b{font-size:18px;font-weight:800}
.dpov .cstep span{font-size:10px;font-weight:700;letter-spacing:.04em;text-align:center;color:rgba(247,231,198,.7)}
.dpov .cstep.cst-published{background:#E38361;border-color:#E38361;color:#2B2118}
.dpov .cstep.cst-published span{color:rgba(43,33,24,.75)}
.dpov a.mini{display:inline-flex;align-items:center;text-decoration:none}
.dpov h4.dpsec{margin:4px 0 -4px;font-size:13px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:rgba(247,231,198,.6)}
body.role-member #stRecorder{display:none} /* the camera recorder is owners only (docs/studio-recorder.md) */
