/* OnDuhGo Twin — the members' sandbox: ribbon, truck chat, locked doors, the owners' Sandbox tab (docs/members-sandbox.md).
   Baloo 2 and the six brand colours only: Espresso #4A2A18, Cream #F7E7C6, Coral #E38361, Tan #C89B6C, Ink #2B2118, Paper #FFFBF2. */

#sbxRibbon,.sbx-chat,#sbxPanel,.sbx-modal,#sbxToast,#sbxTab{font-family:"Baloo 2","Work Sans","Segoe UI",sans-serif}

/* ---------------------------------------------------------------- the ribbon */
#sbxRibbon{position:fixed;left:50%;transform:translateX(-50%);bottom:86px;z-index:40;display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;
  width:min(980px,calc(100vw - 24px));box-sizing:border-box;padding:8px 10px 8px 16px;border-radius:16px;
  background:rgba(43,33,24,.95);color:#F7E7C6;border:1px solid rgba(200,155,108,.45);box-shadow:0 10px 30px rgba(43,33,24,.35);font-size:14px;line-height:1.35}
#sbxRibbon>b{font-weight:800;letter-spacing:.14em;text-transform:uppercase;font-size:12px;color:#2B2118;background:#E38361;padding:2px 9px;border-radius:999px}
#sbxRibbon .sbx-what{flex:1 1 260px;color:rgba(247,231,198,.86)}
#sbxRibbon .sbx-who{font-weight:700;color:#F7E7C6}
#sbxRibbon .sbx-acts{display:flex;gap:8px;margin-left:auto}
.sbx-live{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:#C89B6C;white-space:nowrap}
.sbx-live i{width:8px;height:8px;border-radius:50%;background:#E38361;box-shadow:0 0 0 0 rgba(227,131,97,.6);animation:sbxPulse 2.4s infinite}
@keyframes sbxPulse{0%{box-shadow:0 0 0 0 rgba(227,131,97,.55)}70%{box-shadow:0 0 0 8px rgba(227,131,97,0)}100%{box-shadow:0 0 0 0 rgba(227,131,97,0)}}
@media (prefers-reduced-motion:reduce){.sbx-live i{animation:none}}
body.sbx-guest #signoutBtn,body.sbx-guest #dpDock [data-proxy="signoutBtn"],body.sbx-guest #importBtn{display:none!important}
body.sbx-embed #sbxRibbon{bottom:84px}
@media (max-width:640px){
  #sbxRibbon{bottom:84px;padding:8px 10px;gap:6px 10px;font-size:13px}
  #sbxRibbon .sbx-what{display:none}
  #sbxRibbon .sbx-acts{width:100%}
  #sbxRibbon .sbx-acts>*{flex:1;justify-content:center}
}

/* ---------------------------------------------------------------- buttons */
.sbx-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 16px;border-radius:999px;border:1px solid transparent;
  font:700 14px/1 "Baloo 2","Work Sans",sans-serif;cursor:pointer;text-decoration:none;white-space:nowrap}
.sbx-btn svg{width:18px;height:18px}
.sbx-btn.go{background:#E38361;color:#2B2118}
@media (hover:hover){.sbx-btn.go:hover{background:#F7E7C6}}
.sbx-btn.ghost{background:transparent;color:inherit;border-color:rgba(200,155,108,.55)}
@media (hover:hover){.sbx-btn.ghost:hover{border-color:#E38361;color:#E38361}}
.sbx-btn.sm{min-height:30px;padding:0 12px;font-size:13px}
.sbx-btn:disabled{opacity:.5;cursor:default}
.sbx-btn:focus-visible,.sbx-x:focus-visible,.sbx-tabs button:focus-visible,#sbxTab:focus-visible{outline:2px solid #E38361;outline-offset:2px}
#sbxChatBtn.sbx-dot::after{content:"";width:8px;height:8px;border-radius:50%;background:#2B2118;margin-left:2px}
.sbx-x{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;border:0;background:transparent;color:inherit;cursor:pointer}
.sbx-x svg{width:20px;height:20px}
.sbx-x:hover{background:rgba(200,155,108,.18)}

/* ---------------------------------------------------------------- modal cards */
.sbx-modal{position:fixed;inset:0;z-index:2147483100;display:grid;place-items:center;padding:16px;background:rgba(43,33,24,.62)}
.sbx-card{width:min(460px,100%);max-height:calc(100vh - 32px);overflow:auto;box-sizing:border-box;padding:22px 22px 18px;border-radius:18px;background:#FFFBF2;color:#2B2118;
  box-shadow:0 20px 50px rgba(43,33,24,.45);line-height:1.6}
.sbx-card h2{margin:0 0 6px;font-size:24px;font-weight:800;color:#4A2A18;line-height:1.2}
.sbx-card h2+.sbx-lead{margin-top:0}
.sbx-lead{margin:6px 0 14px;font-size:15px}
.sbx-card label{display:block;margin:10px 0 0;font-weight:600;font-size:14px;color:#4A2A18}
.sbx-card input:not([type=checkbox]),.sbx-card textarea{display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:9px 12px;border-radius:10px;border:1px solid #C89B6C;
  background:#FFFBF2;color:#2B2118;font:500 15px/1.5 "Baloo 2","Work Sans",sans-serif}
.sbx-card input:focus,.sbx-card textarea:focus{outline:2px solid #E38361;outline-offset:1px;border-color:#E38361}
.sbx-card .sbx-btn.ghost{color:#4A2A18}
@media (hover:hover){.sbx-card .sbx-btn.go:hover{background:#4A2A18;color:#F7E7C6}}
.sbx-pfx{display:flex;align-items:stretch;margin-top:4px}
.sbx-pfx span{display:grid;place-items:center;padding:0 10px;border:1px solid #C89B6C;border-right:0;border-radius:10px 0 0 10px;background:#F7E7C6;font-weight:700;color:#4A2A18}
.sbx-pfx input{margin-top:0!important;border-radius:0 10px 10px 0!important}
.sbx-card i{font-style:normal;font-weight:700;color:#4A2A18}
.sbx-check{display:flex!important;gap:10px;align-items:flex-start;font-weight:500!important;line-height:1.5}
.sbx-check input{margin-top:5px;accent-color:#E38361;width:18px;height:18px;flex:none}
.sbx-dim{color:rgba(43,33,24,.66);font-weight:500;font-size:13px}
.sbx-row{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin:16px 0 0}
.sbx-row.l{justify-content:flex-start;margin:8px 0}
.sbx-msg{min-height:1.4em;margin:8px 0 0;font-size:14px;font-weight:600;color:#4A2A18}
.sbx-msg.err{color:#2B2118;background:rgba(227,131,97,.22);padding:4px 10px;border-radius:8px}
.sbx-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0}
.sbx-lockic{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#F7E7C6;color:#4A2A18;margin-bottom:8px}
.sbx-lockic svg{width:24px;height:24px}

/* locked departments on the dock */
#dpDock .dpk.sbx-locked{opacity:.55}
#dpDock .dpk.sbx-locked b::after{content:"";display:inline-block;width:10px;height:10px;margin-left:5px;vertical-align:-1px;
  background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat}

/* ---------------------------------------------------------------- the truck chat */
.sbx-chat{display:flex;flex-direction:column;min-height:0;background:#FFFBF2;color:#2B2118}
.sbx-chat.floating{position:fixed;right:12px;bottom:150px;z-index:45;width:min(380px,calc(100vw - 24px));height:min(520px,calc(100vh - 220px));border-radius:18px;
  border:1px solid #C89B6C;box-shadow:0 18px 44px rgba(43,33,24,.42);overflow:hidden}
.sbx-chat[hidden]{display:none}
.sbx-chat.docked{height:100%}
.sbx-chat header{display:flex;align-items:center;gap:10px;padding:10px 8px 10px 16px;background:#4A2A18;color:#F7E7C6}
.sbx-chat header b{font-weight:800;font-size:16px}
.sbx-chat .sbx-on{flex:1;font-size:13px;font-weight:600;color:#C89B6C}
.sbx-chat.docked header{display:none}
.sbx-list{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.sbx-m{max-width:88%;align-self:flex-start;padding:8px 12px;border-radius:14px 14px 14px 4px;background:#F7E7C6;line-height:1.55;font-size:15px}
.sbx-m.mine{align-self:flex-end;border-radius:14px 14px 4px 14px;background:#FFFBF2;border:1px solid #C89B6C}
.sbx-m.own{background:#4A2A18;color:#F7E7C6}
.sbx-m.own .sbx-meta{color:#C89B6C}
.sbx-meta{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:500;color:rgba(43,33,24,.66);margin-bottom:2px}
.sbx-meta b{font-weight:700}
.sbx-text{white-space:pre-wrap;word-break:break-word}
.sbx-del{margin-left:auto;border:0;background:transparent;color:inherit;cursor:pointer;width:22px;height:22px;display:grid;place-items:center;opacity:.6;border-radius:50%}
.sbx-del:hover{opacity:1;background:rgba(200,155,108,.25)}
.sbx-del svg{width:14px;height:14px}
.sbx-play{display:inline-flex;align-items:center;gap:6px;border:1px solid #C89B6C;background:transparent;color:inherit;border-radius:999px;padding:3px 12px 3px 8px;font:600 14px "Baloo 2",sans-serif;cursor:pointer}
.sbx-play svg{width:16px;height:16px}
.sbx-m audio{display:block;width:230px;max-width:100%;height:34px}
.sbx-empty{margin:auto;text-align:center;color:rgba(43,33,24,.66);font-size:14px;max-width:30ch;line-height:1.6}
.sbx-say{display:flex;align-items:flex-end;gap:6px;padding:10px;border-top:1px solid rgba(200,155,108,.5);background:#FFFBF2}
.sbx-say[hidden]{display:none}
.sbx-say textarea{flex:1;resize:none;min-height:38px;max-height:120px;box-sizing:border-box;padding:8px 12px;border-radius:12px;border:1px solid #C89B6C;background:#FFFBF2;color:#2B2118;
  font:500 15px/1.45 "Baloo 2","Work Sans",sans-serif}
.sbx-say textarea:focus{outline:2px solid #E38361;outline-offset:0}
.sbx-mic,.sbx-send{flex:none;width:40px;height:40px;border-radius:50%;border:1px solid #C89B6C;background:#F7E7C6;color:#4A2A18;display:grid;place-items:center;cursor:pointer}
.sbx-send{background:#E38361;border-color:#E38361;color:#2B2118}
.sbx-mic svg,.sbx-send svg{width:20px;height:20px}
.sbx-mic:hover{border-color:#E38361}
.sbx-rec{display:flex;align-items:center;gap:10px;margin:0;padding:10px 12px;border-top:1px solid rgba(200,155,108,.5);font-weight:700;color:#4A2A18}
.sbx-rec[hidden]{display:none}
.sbx-rec i{width:10px;height:10px;border-radius:50%;background:#E38361;animation:sbxPulse 1.4s infinite}
.sbx-rec span{flex:1}
@media (max-width:640px){.sbx-chat.floating{right:8px;left:8px;width:auto;bottom:150px;height:calc(100vh - 230px)}}

/* ---------------------------------------------------------------- the owners' Sandbox tab */
#sbxTab{position:relative}
#modeSeg #sbxTab{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;padding:inherit}
.sbx-n{display:inline-block;min-width:16px;height:16px;margin-left:5px;padding:0 4px;box-sizing:border-box;border-radius:8px;background:#E38361;color:#2B2118;font:800 11px/16px "Baloo 2",sans-serif;text-align:center;vertical-align:1px}
.sbx-n[hidden]{display:none}
#sbxPanel{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:#2B2118;color:#F7E7C6}
#sbxPanel[hidden]{display:none}
#sbxPanel>header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 12px 10px 18px;border-bottom:1px solid rgba(200,155,108,.35)}
#sbxPanel>header>b{font-size:20px;font-weight:800}
#sbxPanel>header .sbx-what{flex:1;color:rgba(247,231,198,.72);font-size:14px}
.sbx-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 400px}
.sbx-frame{position:relative;min-height:0;background:#4A2A18}
.sbx-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
#sbxPanel aside{min-height:0;display:flex;flex-direction:column;background:#FFFBF2;color:#2B2118;border-left:1px solid #C89B6C}
.sbx-tabs{display:flex;gap:2px;padding:8px 8px 0;background:#F7E7C6;border-bottom:1px solid #C89B6C}
.sbx-tabs button{flex:1;border:0;background:transparent;color:#4A2A18;font:700 14px "Baloo 2",sans-serif;padding:8px 6px;border-radius:10px 10px 0 0;cursor:pointer}
.sbx-tabs button[aria-selected="true"]{background:#FFFBF2;box-shadow:inset 0 -3px 0 #E38361}
.sbx-pane{flex:1;min-height:0;overflow:auto;padding:12px 14px;line-height:1.6}
.sbx-pane[data-pane=chat]{padding:0;display:flex;flex-direction:column}
.sbx-pane[hidden]{display:none}
.sbx-pane h3{margin:14px 0 6px;font-size:16px;font-weight:800;color:#4A2A18}
.sbx-pane .sbx-btn.ghost{color:#4A2A18}
.sbx-req{padding:10px 0;border-bottom:1px solid rgba(200,155,108,.45);font-size:14px}
.sbx-req p{margin:4px 0}
.sbx-t{width:100%;border-collapse:collapse;font-size:13px}
.sbx-t th{text-align:left;font-weight:700;color:#4A2A18;border-bottom:1px solid #C89B6C;padding:4px 6px 4px 0}
.sbx-t td{vertical-align:top;padding:6px 6px 6px 0;border-bottom:1px solid rgba(200,155,108,.35)}
.sbx-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
@media (max-width:900px){
  .sbx-body{grid-template-columns:1fr;grid-template-rows:minmax(240px,45vh) 1fr}
  #sbxPanel aside{border-left:0;border-top:1px solid #C89B6C}
  #sbxPanel>header .sbx-what{display:none}
}

#sbxToast{position:fixed;left:50%;bottom:160px;transform:translate(-50%,20px);z-index:2147483200;padding:8px 16px;border-radius:999px;background:#2B2118;color:#F7E7C6;
  border:1px solid #C89B6C;font-weight:600;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100vw - 32px);text-align:center}
#sbxToast.on{opacity:1;transform:translate(-50%,0)}

/* attract mode (/?embed=1&loop=1): onduhgo.com's looping backdrop, nothing to click, no ribbon or toasts */
body.sbx-attract #sbxRibbon,body.sbx-attract #sbxToast,body.sbx-attract .sbx-modal,body.sbx-attract #jbBar{display:none!important}
body.sbx-attract{cursor:default}
