/* Bot HQ v8 — urgent ticket alarm, sound controls. Lastoria orange #F3734E, button #C44D28, alarm red #ff2d2d. */
:root{--al-red:#ff2d2d;--al-deep:#8f0d0d;--lo:#F3734E;--lo-btn:#C44D28}
#alarm-frame{position:fixed;inset:0;z-index:9000;pointer-events:none;display:none;
  box-shadow:inset 0 0 0 7px var(--al-red),inset 0 0 140px 40px rgba(255,30,30,.55);animation:alPulse 1s ease-in-out infinite}
body.alarm-on #alarm-frame{display:block}
body.alarm-silenced #alarm-frame{animation-duration:2.4s}
@keyframes alPulse{0%,100%{opacity:.25}50%{opacity:1}}
#alarm-banner{position:fixed;left:0;right:0;top:0;z-index:9001;display:none;align-items:center;gap:16px;padding:10px 18px;
  background:linear-gradient(90deg,#5c0606,#b31212 30%,#d61f1f 60%,#8f0d0d);color:#fff;border-bottom:3px solid var(--lo);
  box-shadow:0 8px 30px rgba(255,20,20,.45);font-family:inherit}
body.alarm-on #alarm-banner{display:flex;animation:alBanner 1s ease-in-out infinite}
@keyframes alBanner{0%,100%{filter:brightness(1)}50%{filter:brightness(1.25)}}
body.alarm-test #alarm-banner{background:repeating-linear-gradient(135deg,#7a0b0b 0 22px,#9c1414 22px 44px)}
.al-txt{flex:1;min-width:0;line-height:1.2}
.al-k{font-weight:800;letter-spacing:.12em;font-size:13px;opacity:.95}
.al-test{background:#fff;color:#b31212;padding:1px 8px;border-radius:6px;letter-spacing:.2em;margin-right:4px}
.al-r{font-size:26px;font-weight:900;text-shadow:0 2px 0 rgba(0,0,0,.35);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-m{font-size:14px;opacity:.95}.al-ago{opacity:.8}
.al-more{background:rgba(0,0,0,.3);padding:1px 8px;border-radius:10px;margin-left:6px}
.al-btns{display:flex;gap:8px;flex:none}
.al-btns button{font:inherit;font-weight:800;border-radius:12px;cursor:pointer;padding:12px 20px;font-size:16px;border:0}
.al-ack{background:var(--lo-btn);color:#fff;box-shadow:0 0 0 3px #fff inset,0 4px 14px rgba(0,0,0,.4)}
.al-ack:hover,.al-ack:focus-visible{background:var(--lo);outline:none}
.al-snd{background:#fff;color:#b31212;animation:alBanner .8s ease-in-out infinite}
.al-sil{background:rgba(0,0,0,.35);color:#fff;border:1px solid rgba(255,255,255,.4)!important}
/* rotating siren light (CSS) */
.al-siren{width:46px;height:46px;flex:none;position:relative;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fff 0 8%,#ff6b6b 20%,#e00000 60%,#7a0000);box-shadow:0 0 22px 6px rgba(255,60,60,.9)}
.al-siren i{position:absolute;inset:-14px;border-radius:50%;background:conic-gradient(from 0deg,rgba(255,255,255,.75) 0 30deg,transparent 30deg 180deg,rgba(255,255,255,.75) 180deg 210deg,transparent 210deg);
  mask:radial-gradient(circle,transparent 45%,#000 46%);-webkit-mask:radial-gradient(circle,transparent 45%,#000 46%);animation:alSpin .8s linear infinite}
@keyframes alSpin{to{transform:rotate(360deg)}}
/* Pepper's desk + figure */
.alarm-desk .floorglow{fill:var(--al-red)!important;opacity:1!important;animation:alPulse .8s ease-in-out infinite}
g.alarm-desk:not(.desk) {animation:alDesk .8s ease-in-out infinite}
@keyframes alDesk{0%,100%{filter:drop-shadow(0 0 0 rgba(255,0,0,0))}50%{filter:drop-shadow(0 0 14px #ff2d2d) drop-shadow(0 0 4px #ff2d2d)}}
.alarm-desk .plate rect{fill:#b31212!important;stroke:#fff!important;stroke-width:1.5}
.alarm-siren .as-dome{fill:#ff2020;stroke:#7a0000;stroke-width:1;animation:alDome .5s steps(2) infinite}
.alarm-siren .as-base{fill:#333;stroke:#111}
.alarm-siren .as-glint{fill:#fff;opacity:.8}
.alarm-siren .as-beams{fill:rgba(255,60,60,.38);animation:alSpinSvg 1s linear infinite;transform-origin:0 -3px}
@keyframes alSpinSvg{to{transform:rotate(360deg)}}
@keyframes alDome{0%{fill:#ff2020}100%{fill:#ffb3b3}}
/* sound button (header) + TV dock + panel */
#hdr .tools #sndctl{width:auto;padding:0 10px;display:inline-flex;align-items:center;gap:6px;font-size:14px;color:inherit;white-space:nowrap}
#sndctl .sl,#snddock .sl{font-size:12px;font-weight:700}
#sndctl.locked,#snddock.locked{border-color:var(--lo);background:color-mix(in srgb,var(--lo) 22%,transparent)}
#sndctl.on .sl{display:none}
#snddock,#sndctl.float{position:fixed;left:12px;bottom:calc(var(--tk,40px) + 12px);z-index:60;display:none;align-items:center;gap:6px;padding:8px 12px;
  border-radius:12px;border:1px solid rgba(255,255,255,.2);background:rgba(10,14,30,.75);color:#fff;font:inherit;cursor:pointer;opacity:.55}
#sndctl.float{display:inline-flex}
body.tv #snddock{display:inline-flex}
body.tv #snddock.on{opacity:.25}
body.tv #snddock.locked{opacity:1}
#snddock:hover{opacity:1}
#sndpanel{position:fixed;top:calc(var(--hdr,62px) + 8px);right:12px;z-index:9100;width:min(320px,calc(100vw - 24px));background:#0d1430;color:#e9efff;
  border:1px solid color-mix(in srgb,var(--lo) 60%,transparent);border-radius:14px;padding:12px 14px;box-shadow:0 14px 40px rgba(0,0,0,.5);font-size:14px}
body.tv #sndpanel{top:auto;bottom:calc(var(--tk,58px) + 60px);right:auto;left:12px}
.sp-h{font-weight:800;display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.sp-x{background:none;border:0;color:inherit;cursor:pointer;font-size:16px}
.sp-st{padding:6px 8px;border-radius:8px;margin-bottom:8px;font-size:13px}.sp-st.ok{background:rgba(61,255,168,.12)}.sp-st.bad{background:rgba(243,115,78,.18)}
.sp-big{width:100%;padding:10px;border-radius:10px;border:0;background:var(--lo-btn);color:#fff;font-weight:800;font-size:15px;cursor:pointer;margin-bottom:8px}
.sp-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 0;border-top:1px solid rgba(255,255,255,.07)}
.sp-row input[type=range]{width:150px;accent-color:var(--lo)}.sp-row input[type=checkbox]{width:18px;height:18px;accent-color:var(--lo)}
.sp-btns{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.sp-btns button{flex:1;padding:8px;border-radius:10px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.06);color:inherit;cursor:pointer;font:inherit;font-size:13px}
.sp-n{font-size:11.5px;opacity:.65;margin-top:8px}
#hq-offline{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--tk,40px) + 64px);z-index:61;display:none;background:#5a3b00;color:#ffe2a8;
  border:1px solid #c98a00;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:700}
body.hq-offline #hq-offline{display:block}
/* TV: bigger banner */
body.tv .al-r{font-size:40px}body.tv .al-k{font-size:17px}body.tv .al-m{font-size:19px}body.tv .al-siren{width:64px;height:64px}
body.tv .al-btns button{font-size:20px;padding:16px 26px}
body.tv.alarm-on{cursor:default}
/* phone */
@media (max-width:760px){
  #alarm-banner{flex-wrap:wrap;gap:10px;padding:10px 12px}
  .al-siren{width:30px;height:30px;margin:0 4px 0 6px}.al-siren i{inset:-7px}.al-r{font-size:20px;white-space:normal}.al-m{font-size:12.5px}.al-k{font-size:11px}
  .al-btns{width:100%}.al-btns button{flex:1;padding:12px 10px}
  #hdr .tools #sndctl{padding:0 7px}#sndctl .sl{display:none}#sndctl.locked .sl{display:inline;font-size:11px}
}
/* reduced motion: keep the alarm obvious but static */
@media (prefers-reduced-motion:reduce){#alarm-frame{opacity:1}}
/* ---- v8 calm audio: panel sized for a TV remote / touch, quiet chip ---- */
body.calm-audio #snd{display:none}
#sndpanel{max-height:calc(100dvh - var(--hdr,62px) - var(--tk,40px) - 30px);overflow:auto;width:min(380px,calc(100vw - 24px));font-size:15px}
.sp-row{min-height:46px}
.sp-row small{display:block;font-size:11.5px;opacity:.6;font-weight:400}
.sp-row input[type=checkbox]{width:26px;height:26px;flex:none}
.sp-row select{background:#18214a;color:inherit;border:1px solid rgba(255,255,255,.2);border-radius:8px;padding:6px;font:inherit}
.sp-hours{justify-content:flex-start;gap:8px}
.sp-seg{display:flex;gap:0;margin:8px 0;border:1px solid rgba(255,255,255,.18);border-radius:12px;overflow:hidden}
.sp-seg button{flex:1;min-height:46px;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer}
.sp-seg button.on{background:var(--lo-btn);color:#fff}
.sp-big.meet{background:#26305e;border:1px solid rgba(255,255,255,.2)}.sp-big.meet.on{background:#5b3fa8}
.sp-big{min-height:48px}
.sp-btns button{min-height:44px}
body.tv #sndpanel{width:420px;font-size:17px;bottom:calc(var(--tk,58px) + 70px)}
body.tv #snddock{min-height:52px;font-size:18px;padding:10px 16px}
#quietchip{position:fixed;bottom:calc(var(--tk,40px) + 14px);left:50%;transform:translateX(-50%);z-index:62;border-radius:22px;padding:8px 16px;min-height:40px;
  background:rgba(20,26,56,.85);color:#cfd8ff;border:1px solid rgba(255,255,255,.18);font:inherit;font-size:14px;cursor:pointer}
#quietchip.meet{background:#4b2f95;color:#fff;border-color:#a58cff;box-shadow:0 0 18px rgba(140,110,255,.5)}
#quietchip b{margin-left:8px;background:rgba(255,255,255,.2);padding:2px 8px;border-radius:10px}
#quietchip[hidden]{display:none}
body.tv #quietchip{font-size:17px}
body.alarm-on #quietchip{display:none}
@media (max-width:760px){
  #sndpanel{top:auto;bottom:calc(var(--tk,40px) + 10px);left:10px;right:10px;width:auto;max-height:calc(100dvh - var(--tk,40px) - 40px)}
  #quietchip{font-size:13px;white-space:nowrap}
}

/* ---------- v10: Tim's Spotify "Now playing" widget (official Spotify embed) ---------- */
.sp-hide{display:none!important}
.sp-lbl{font-size:11px;letter-spacing:.12em;text-transform:uppercase;opacity:.6;margin-top:10px}
.sp-src{margin-top:4px}
.sp-spst{opacity:.85;margin-top:0;margin-bottom:6px}.sp-spst b{color:#F3734E}
#spw{position:fixed;right:14px;bottom:calc(var(--vswb,60px) + 42px);z-index:58;width:290px;border-radius:14px;overflow:hidden;
  background:rgba(14,16,24,.92);border:1px solid rgba(243,115,78,.45);box-shadow:0 8px 26px rgba(0,0,0,.45);backdrop-filter:blur(8px);color:#f2f2f2;
  font:600 12.5px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;transition:opacity .25s}
#spw.gone{display:none}
#spw .spw-hd{display:flex;align-items:center;gap:9px;width:100%;padding:8px 11px;min-height:42px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;text-align:left}
#spw .spw-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#spw .spw-t b{color:#F3734E;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#spw .spw-t em{font-style:normal;font-weight:500;font-size:11px;color:#b5b5b5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#spw .spw-car{width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:#C44D28;color:#fff;font-size:12px}
#spw .spw-eq{display:flex;align-items:flex-end;gap:2px;width:16px;height:16px}
#spw .spw-eq i{flex:1;background:#808080;height:30%;border-radius:1px}
#spw.playing .spw-eq i{background:#F3734E;animation:spweq 1s ease-in-out infinite}
#spw.playing .spw-eq i:nth-child(2){animation-delay:-.35s}#spw.playing .spw-eq i:nth-child(3){animation-delay:-.7s}
@keyframes spweq{0%,100%{height:25%}50%{height:100%}}
@media (prefers-reduced-motion:reduce){#spw.playing .spw-eq i{animation:none;height:70%}}
#spw .spw-bar{height:3px;background:rgba(128,128,128,.35)}#spw .spw-bar i{display:block;height:100%;width:0;background:#F3734E;transition:width .6s linear}
#spw .spw-body{height:0;overflow:hidden;transition:height .25s}
#spw.open .spw-body{height:auto;padding:8px}
#spw.open.preview .spw-body{padding-bottom:6px}
#spw-embed iframe{display:block;border:0;border-radius:12px}
#spw .spw-hint:empty{display:none}
#spw .spw-hint{font-size:11.5px;font-weight:600;color:#F3734E;padding:6px 2px 0}
#spw.preview:not(.open) .spw-t em::after{content:" · preview";color:#F3734E}
body.tv #spw{width:330px;opacity:.55;font-size:15px}body.tv #spw:hover,body.tv #spw.open{opacity:1}
body.tv #spw .spw-t em{font-size:13px}
body.alarm-on #spw{opacity:.35}
@media (max-width:760px){#spw{right:8px;width:min(250px,calc(100vw - 16px));bottom:calc(var(--vswb,60px) + 38px)}#spw .spw-hd{min-height:38px;padding:6px 9px}}
body.bp-open #spw{right:calc(min(410px,100vw - 20px) + 22px)}
body.tv #spw{bottom:calc(var(--vswb,60px) - 6px);right:100px;width:300px}
@media (max-width:760px){
  #spw:not(.open){width:auto;max-width:150px}#spw:not(.open) .spw-t,#spw:not(.open) .spw-bar{display:none}
  #spw:not(.open) .spw-hd{gap:7px;padding:6px 8px;min-height:36px}
  #spw.preview:not(.open) .spw-hd::after{content:"preview";font-size:10px;color:#F3734E}
  body.bp-open #spw{display:none}
}
/* ---------- v10.1: Spotify source switcher ---------- */
.sp-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:4px 0 8px}
.sp-grid button{min-height:44px;padding:6px 8px;border-radius:10px;border:1px solid rgba(255,255,255,.18);background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-grid button.on{background:#C44D28;border-color:#F3734E;color:#fff}
.sp-grid button:focus-visible,.sp-mine input:focus,.sp-mine button:focus-visible{outline:2px solid #F3734E;outline-offset:1px}
.sp-mine{display:flex;gap:6px;margin:2px 0 4px}
.sp-mine input{flex:1;min-width:0;min-height:42px;padding:6px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);color:inherit;font:inherit;font-size:14px}
.sp-mine button{min-height:42px;padding:0 14px;border-radius:10px;border:0;background:#C44D28;color:#fff;font:inherit;font-weight:800;cursor:pointer}
.sp-mine-n{margin-top:2px}
.sp-err{color:#ffb199;opacity:1}
#spw .spw-src{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:11.5px;color:#b5b5b5}
#spw .spw-src select{flex:1;min-width:0;min-height:32px;border-radius:8px;border:1px solid rgba(243,115,78,.5);background:#1b1e29;color:#f2f2f2;font:inherit;font-size:12.5px;padding:2px 6px}
body.tv #spw .spw-src select{min-height:40px;font-size:15px}
/* v10.2: in the persistent shell the widget sits above the view frame: step aside while a panel/menu is open over that corner */
body.spw-cover #spw{opacity:0;pointer-events:none}

/* v11.1 play/pause on the Spotify widget */
#spw .spw-row{display:flex;align-items:center}
#spw .spw-row .spw-hd{flex:1;min-width:0;padding-left:4px}
#spw .spw-pp{flex:none;margin-left:8px;width:36px;height:36px;border-radius:50%;border:1px solid rgba(243,115,78,.7);background:#C44D28;color:#fff;font:700 13px/1 system-ui,sans-serif;cursor:pointer;display:grid;place-items:center;padding:0}
#spw .spw-pp.on{background:#2a2422;color:#F3734E}
#spw .spw-pp:hover{filter:brightness(1.12)}#spw .spw-pp:disabled{opacity:.45;cursor:default}
#spw .spw-pp:focus-visible,#spw .spw-hd:focus-visible{outline:3px solid #F3734E;outline-offset:2px}
body.tv #spw .spw-pp{width:48px;height:48px;font-size:17px}
@media (max-width:760px){#spw:not(.open) .spw-pp{width:32px;height:32px;margin-left:6px}}
