:root{color-scheme:dark;--bg:#07090c;--panel:#0d1116;--panel2:#121821;--line:#26313d;--text:#eef3f7;--muted:#8d9aa8;--cream:#f1ead8;--orange:#ff8a24;--red:#dc4026;--green:#52d879;--blue:#4ea2ff;--grid-size:20px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#000;color:var(--text)}button,input,select,textarea{font:inherit}.pbs-app{width:100%;height:100%;display:grid;grid-template-rows:92px minmax(0,1fr) 30px;background:radial-gradient(circle at 50% -30%,#17202c 0,#090c10 43%,#050608 100%)}.topbar{min-width:0;display:flex;align-items:center;gap:13px;padding:9px 14px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#111720,#0b0f14);box-shadow:0 8px 28px rgba(0,0,0,.35);z-index:20}.brand{min-width:248px;height:72px;display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none}.brand img{width:116px;height:54px;object-fit:contain}.brand-copy{display:flex;flex-direction:column;line-height:.94;letter-spacing:.12em}.brand-copy strong{color:var(--cream);font-size:22px}.brand-copy small{color:var(--orange);font-size:11px;margin-top:7px;font-weight:900;letter-spacing:.28em}.top-field{display:flex;flex-direction:column;gap:4px;min-width:0}.top-field>span,.custom-resolution label>span{color:#8ea0b2;font-size:10px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}.top-field input,.top-field select,.custom-resolution input{height:38px;border:1px solid #334151;border-radius:6px;background:#080b0f;color:var(--text);padding:0 10px;outline:none}.top-field input:focus,.top-field select:focus,.custom-resolution input:focus{border-color:var(--orange);box-shadow:0 0 0 2px rgba(255,138,36,.16)}.project-field{width:clamp(180px,19vw,310px)}.profile-field{width:clamp(210px,23vw,330px)}.zoom-field{width:96px}.custom-resolution{height:59px;display:flex;align-items:flex-end;gap:6px;padding-bottom:1px}.custom-resolution[hidden]{display:none}.custom-resolution label{display:flex;flex-direction:column;gap:4px;width:78px}.custom-resolution input{width:78px}.resolution-by{color:var(--muted);padding-bottom:10px}.toolbar-actions{margin-left:auto;display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap;justify-content:flex-end}button{min-height:36px;padding:7px 12px;border:1px solid #334151;border-radius:6px;background:linear-gradient(180deg,#1a222c,#10161d);color:var(--text);cursor:pointer;font-weight:750;font-size:12px;transition:.15s}button:hover:not(:disabled){border-color:#657587;background:linear-gradient(180deg,#222c38,#141c25)}button.primary{border-color:#d96e19;background:linear-gradient(180deg,#f17f22,#bd4f08);color:#fff}button:disabled{cursor:default;opacity:.38}.workspace{min-height:0;display:grid;grid-template-columns:278px minmax(400px,1fr) 322px}.panel-column{min-height:0;background:rgba(12,16,21,.97);overflow:auto;scrollbar-color:#354352 #0b0e12}.toolbox{border-right:1px solid var(--line)}.inspector{border-left:1px solid var(--line)}.panel-heading{position:sticky;top:0;z-index:4;min-height:64px;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:12px 14px;border-bottom:1px solid var(--line);background:rgba(13,17,22,.96);backdrop-filter:blur(7px)}.panel-heading>span{font-size:13px;font-weight:900;letter-spacing:.12em}.panel-heading small{color:var(--muted);font-size:11px}.toolbox-search-wrap{padding:12px 12px 5px}.toolbox-search-wrap input{width:100%;height:38px;padding:0 11px;border:1px solid #2a3542;border-radius:7px;background:#080b0f;color:var(--text);outline:none}.toolbox-group{padding:6px 11px 10px;border-bottom:1px solid #171e26}.toolbox-group-title{padding:10px 3px 7px;color:#dce5ed;font-size:11px;font-weight:900;letter-spacing:.13em}.toolbox-button{width:100%;min-height:54px;margin:0 0 7px;padding:8px;display:grid;grid-template-columns:36px 1fr;align-items:center;gap:9px;text-align:left;border-color:#2b3642;background:linear-gradient(180deg,#171e26,#11171e)}.toolbox-button:hover{border-color:#e8781e!important}.toolbox-icon{width:34px;height:34px;display:grid;place-items:center;border:1px solid #3b4958;border-radius:5px;background:#0a0d11;color:var(--orange);font-weight:950;font-size:12px}.toolbox-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.toolbox-copy strong{font-size:12px}.toolbox-copy small{color:var(--muted);font-size:10px;line-height:1.25}.designer{min-width:0;min-height:0;display:grid;grid-template-rows:48px minmax(0,1fr);background:#030405}.designer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;border-bottom:1px solid var(--line);background:#0b0f14}.designer-left{display:flex;gap:7px}.toggle.active{border-color:#e7771f;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,138,36,.25)}.canvas-readout{min-width:0;display:flex;align-items:baseline;gap:12px}.canvas-readout strong{font-size:12px;color:var(--cream)}.canvas-readout span{color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.canvas-viewport{position:relative;min-width:0;min-height:0;overflow:auto;background:radial-gradient(circle at center,rgba(35,45,57,.34),transparent 55%),#020304}.canvas-stage{position:relative;min-width:100%;min-height:100%;padding:30px;display:grid;place-items:center}.dashboard-canvas{position:relative;flex:0 0 auto;width:2560px;height:720px;overflow:hidden;outline:none;transform-origin:0 0;background-color:#090b0e;border:1px solid #536172;box-shadow:0 26px 80px rgba(0,0,0,.68),0 0 0 1px #000}.dashboard-canvas.grid-on{background-image:linear-gradient(rgba(103,123,145,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(103,123,145,.12) 1px,transparent 1px),linear-gradient(rgba(103,123,145,.19) 1px,transparent 1px),linear-gradient(90deg,rgba(103,123,145,.19) 1px,transparent 1px);background-size:var(--grid-size) var(--grid-size),var(--grid-size) var(--grid-size),calc(var(--grid-size)*5) calc(var(--grid-size)*5),calc(var(--grid-size)*5) calc(var(--grid-size)*5)}.widget-layer{position:absolute;inset:0}.empty-canvas-message{position:absolute;inset:0;display:grid;place-content:center;gap:8px;text-align:center;pointer-events:none;color:#637080}.empty-canvas-message strong{color:#8795a4;font-size:28px}.empty-canvas-message[hidden]{display:none}.dashboard-widget{position:absolute;min-width:40px;min-height:30px;user-select:none;touch-action:none;cursor:move;border:1px solid transparent}.dashboard-widget.selected{border-color:var(--orange);box-shadow:0 0 0 1px rgba(255,138,36,.25),0 0 18px rgba(255,115,20,.22)}.resize-handle{position:absolute;right:-6px;bottom:-6px;width:14px;height:14px;border:2px solid #080b0f;background:var(--orange);cursor:nwse-resize;display:none}.dashboard-widget.selected .resize-handle{display:block}.widget-frame{width:100%;height:100%;position:relative;overflow:hidden}.widget-label{position:absolute;left:8%;right:8%;bottom:7%;text-align:center;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.widget-units{font-size:.35em;opacity:.7;margin-left:.18em}.digital-content{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:.95}.digital-value{font-weight:900;letter-spacing:-.04em}.text-widget-content{width:100%;height:100%;display:flex;align-items:center;white-space:pre-wrap;overflow:hidden}.image-widget-content{width:100%;height:100%;display:grid;place-items:center;background-position:center;background-repeat:no-repeat;color:#7e8a96;font-size:12px}.analog-gauge,.clock-widget,.compass-widget{width:100%;height:100%;display:grid;place-items:center}.analog-gauge svg{width:100%;height:100%}.gauge-face{fill:#0c1015;stroke:#596879;stroke-width:2}.gauge-arc{fill:none;stroke:#596879;stroke-width:6;stroke-linecap:round}.gauge-warning{fill:none;stroke:#f0c22f;stroke-width:7;stroke-linecap:round}.gauge-danger{fill:none;stroke:#dc432d;stroke-width:7;stroke-linecap:round}.gauge-needle{stroke:#ff8a24;stroke-width:3;stroke-linecap:round}.gauge-hub{fill:#e7edf3}.gauge-number,.gauge-caption{fill:#eef3f7;text-anchor:middle;font-weight:900}.gauge-caption{fill:#9ba8b5;letter-spacing:1px}.led-bar{width:100%;height:100%;padding:12%;display:flex;gap:3px;align-items:stretch;justify-content:center}.led-bar.vertical{flex-direction:column-reverse}.led-segment{flex:1;min-width:3px;min-height:3px;border-radius:2px;background:#273039}.led-segment.on.normal{background:#46d26e;box-shadow:0 0 8px rgba(70,210,110,.55)}.led-segment.on.warning{background:#f2c22f}.led-segment.on.danger{background:#df432e}.graph-widget{width:100%;height:100%;padding:10px;display:grid;grid-template-rows:1fr auto;gap:4px}.graph-widget svg{width:100%;height:100%}.graph-grid{stroke:rgba(150,170,190,.16);stroke-width:1}.graph-line{fill:none;stroke:#4ea2ff;stroke-width:3;vector-effect:non-scaling-stroke}.graph-caption{text-align:center;font-size:11px;font-weight:800}.clock-digital{text-align:center;font-weight:900;line-height:1}.clock-date{display:block;margin-top:7px;font-size:.28em;color:#aeb8c2}.clock-face{width:86%;height:86%;border:3px solid #e8e1d3;border-radius:50%;position:relative;background:#0b0e12}.clock-hand{position:absolute;left:50%;bottom:50%;width:3px;transform-origin:bottom center;background:#f1ead8}.clock-hand.hour{height:25%}.clock-hand.minute{height:34%;width:2px}.clock-hand.second{height:37%;width:1px;background:#df432e}.clock-centre{position:absolute;left:50%;top:50%;width:10px;height:10px;border-radius:50%;background:#f1ead8;transform:translate(-50%,-50%)}.compass-rose{width:84%;aspect-ratio:1;border:3px solid #dce5ed;border-radius:50%;position:relative;background:radial-gradient(circle,#17202a,#090c10 70%)}.compass-letter{position:absolute;font-weight:900}.compass-letter.n{left:50%;top:4%;transform:translateX(-50%);color:#e74b32}.compass-letter.s{left:50%;bottom:4%;transform:translateX(-50%)}.compass-letter.e{right:5%;top:50%;transform:translateY(-50%)}.compass-letter.w{left:5%;top:50%;transform:translateY(-50%)}.compass-arrow{position:absolute;left:50%;top:50%;width:8%;height:63%;transform:translate(-50%,-50%)}.compass-arrow:before{content:"";position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:48px solid #e74b32}.compass-arrow:after{content:"";position:absolute;bottom:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:48px solid #e7edf3}.compass-degree{position:absolute;left:50%;bottom:18%;transform:translateX(-50%);font-weight:900}.status-widget{width:100%;height:100%;padding:10px;display:flex;align-items:center;gap:10px}.status-dot{width:15px;height:15px;border-radius:50%;background:#f0b431}.status-dot.connected{background:#51d679;box-shadow:0 0 12px rgba(81,214,121,.55)}.status-copy{display:flex;flex-direction:column}.status-copy small{color:#91a0ae}.dtc-widget{width:100%;height:100%;padding:10px;display:flex;flex-direction:column;gap:7px}.dtc-header{display:flex;justify-content:space-between;font-weight:900}.dtc-count{color:#51d679}.dtc-list{flex:1;display:grid;place-content:center;color:#8794a1;border:1px dashed #384552}.inspector-empty{padding:18px;color:var(--muted);font-size:12px;line-height:1.55}.inspector-form{padding:10px 12px 24px}.inspector-section{margin:0 0 13px;padding:0 0 12px;border-bottom:1px solid #1b242e}.inspector-section h3{margin:0 0 9px;font-size:11px;letter-spacing:.12em}.inspector-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.inspector-field{display:flex;flex-direction:column;gap:5px;margin-bottom:8px}.inspector-field.full{grid-column:1/-1}.inspector-field label,.checkbox-field>span{color:#9aa8b6;font-size:10px;font-weight:800}.inspector-field input,.inspector-field select,.inspector-field textarea{width:100%;min-height:34px;padding:6px 8px;border:1px solid #33404d;border-radius:5px;background:#080b0f;color:var(--text)}.inspector-field textarea{min-height:70px}.checkbox-field{min-height:34px;display:flex;align-items:center;justify-content:space-between}.statusbar{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:18px;padding:0 12px;border-top:1px solid var(--line);background:#080b0f;color:var(--muted);font-size:10px}.pbs-badge{color:var(--orange);font-weight:900}@media(max-width:1180px){.workspace{grid-template-columns:238px minmax(350px,1fr) 286px}.brand{min-width:205px}.brand img{width:92px}.project-field{width:165px}.profile-field{width:205px}}
/* Tablet workspace: use the real browser viewport instead of forcing a 1360px desktop page. */
@media(max-width:1100px){
  html,body{
    width:100%;
    height:100%;
    min-width:0!important;
    min-height:0!important;
    overflow:hidden!important;
    background:#090c10;
  }
  body{
    width:100dvw;
    height:100dvh;
    min-width:0!important;
    min-height:100dvh!important;
  }
  .pbs-app{
    width:100dvw!important;
    max-width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    overflow:hidden!important;
    background:radial-gradient(circle at 50% -30%,#17202c 0,#090c10 43%,#050608 100%);
  }
  .topbar,
  .workspace,
  .statusbar{
    width:100%;
    min-width:0!important;
    max-width:100dvw;
  }
  .workspace{
    background:#030405;
    overflow:hidden;
  }
  .panel-column,
  .designer,
  .canvas-viewport{
    min-width:0!important;
  }
  .canvas-stage{
    min-width:100%!important;
    padding:16px!important;
  }
  .canvas-viewport{
    background:radial-gradient(circle at center,rgba(35,45,57,.34),transparent 55%),#020304;
  }
}

.toolbox-button.unsupported-capability{opacity:.38;filter:grayscale(.75);cursor:not-allowed!important}.toolbox-button.unsupported-capability .toolbox-copy small{color:#d38b8b}.pbs-preset-widget{width:100%;height:100%;display:flex;gap:6px;align-items:stretch;justify-content:center;padding:7px}.pbs-preset-widget.vertical{flex-direction:column}.pbs-preset-button{flex:1;min-width:28px;min-height:28px;border:1px solid #59636d;border-radius:6px;background:#20262c;color:#d8dfe5;font-weight:900;font-size:13px}.pbs-preset-button.active{border-color:var(--preset-accent);box-shadow:0 0 0 1px var(--preset-accent),0 0 14px rgba(255,255,255,.12);color:#fff}.parity-readout,.parity-coordinate,.parity-status{width:100%;height:100%;display:grid;place-items:center;padding:10px;text-align:center}.parity-readout strong{font-size:clamp(28px,5vw,72px);line-height:.95}.parity-readout small{color:#8d99a5;font-size:.28em}.parity-readout span,.parity-coordinate strong,.parity-status strong{color:#a7b2bd;font-weight:900;letter-spacing:.1em}.parity-coordinate{grid-template-rows:auto 1fr 1fr;align-items:center}.parity-coordinate span{font-size:clamp(16px,2vw,28px);font-variant-numeric:tabular-nums}.parity-status{grid-template-columns:auto 1fr;grid-template-rows:1fr 1fr;text-align:left;place-items:center start;column-gap:10px}.parity-status .status-dot{grid-row:1/3}.parity-control{width:100%;height:100%;display:flex;align-items:center;gap:10px;padding:10px}.parity-control.vertical{flex-direction:column}.parity-control input{flex:1;width:100%}.motorsport-parity{width:100%;height:100%;display:grid;grid-template-columns:1fr 1.3fr;grid-template-rows:1fr auto;align-items:center;padding:18px;background:radial-gradient(circle at 50% 30%,#1c252d,#050709 75%)}.motorsport-parity-rpm{font-size:14px;color:#93a0ac}.motorsport-parity-rpm strong{display:block;font-size:clamp(42px,6vw,90px);color:#fff}.motorsport-parity-speed{font-size:clamp(58px,8vw,120px);font-weight:950;text-align:right}.motorsport-parity-speed small{font-size:.18em;color:#93a0ac}.motorsport-parity-strip{grid-column:1/-1;border-top:1px solid #394653;padding-top:8px;color:#71db8e;font-size:11px;font-weight:900;letter-spacing:.08em}
.parity-screen-power{width:100%;height:100%;display:grid;place-items:center;font-size:34px;color:#f3f0e7;background:radial-gradient(circle,#26303a,#07090c 70%);border-radius:50%}
.pbs-rpm-flash-overlay{position:fixed;inset:0;z-index:2147483600;pointer-events:none;background:var(--rpm-flash-color,#ff2020);opacity:0}
.pbs-rpm-flash-overlay.active{animation:pbsRpmFlash .68s linear}
@keyframes pbsRpmFlash{0%,100%{opacity:0}12%,28%,48%{opacity:.42}20%,38%,64%{opacity:0}}
.pbs-secondary-tach-notice,.pbs-primary-tach-actions{grid-column:1/-1;padding:10px;border-radius:8px;display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
.pbs-secondary-tach-notice{border:1px solid #59616a;background:#171a1e;color:#9ca6af}
.pbs-primary-tach-actions{border:1px solid #4e9b64;background:#102017;color:#c9f4d4}
.pbs-secondary-tach-notice strong,.pbs-primary-tach-actions strong{font-size:11px;letter-spacing:.08em}
.pbs-secondary-tach-notice span,.pbs-primary-tach-actions span{font-size:10px;line-height:1.35}
.pbs-secondary-tach-notice button,.pbs-primary-tach-actions button{align-self:flex-start;margin-top:4px;min-height:30px;padding:4px 9px;border-radius:6px}
.tach-secondary-disabled{opacity:.36;filter:grayscale(.85)}

.pbs-loading-overlay{position:fixed;inset:0;z-index:2147483646;display:grid;place-items:center;background:#05070a;color:#f2f5f7;cursor:wait}
.pbs-loading-overlay[hidden]{display:none!important}
.pbs-loading-card{min-width:260px;padding:28px 34px;border:1px solid #26313c;border-radius:12px;background:#0b1016;box-shadow:0 24px 80px rgba(0,0,0,.72);text-align:center}
.pbs-loading-card strong{display:block;font-size:28px;letter-spacing:.13em}
.pbs-loading-card span{display:block;margin-top:9px;color:#8fa2b5;font-size:12px;letter-spacing:.06em}

.inspector-range-label{display:flex;align-items:center;justify-content:space-between;gap:10px}
.inspector-range-label output{min-width:38px;padding:3px 6px;border:1px solid #33404d;border-radius:4px;background:#080b0f;color:#f3f0e7;text-align:center;font-size:10px;font-variant-numeric:tabular-nums}
.inspector-field input[type="range"]{min-height:24px;padding:0;border:0;background:transparent;accent-color:var(--orange)}

.inspector-subgroup{grid-column:1/-1;margin:0 0 11px;padding:9px 9px 5px;border:1px solid #26313c;border-radius:7px;background:#0a0e13}
.inspector-subgroup h4{margin:0 0 8px;padding:0 0 6px;border-bottom:1px solid #202a34;color:#ef8b36;font-size:9px;font-weight:900;letter-spacing:.14em}
.inspector-subgroup:last-child{margin-bottom:0}

/* Dually Studio alignment guides. */
.widget-layer{z-index:2}
.alignment-guides{position:absolute;inset:0;z-index:70;pointer-events:none;overflow:hidden}
.alignment-guides .guide-line{position:absolute;pointer-events:none;background:#e31b23;box-shadow:0 0 6px rgba(227,27,35,.9);opacity:.96}
.alignment-guides .guide-line.vertical{top:0;bottom:0;width:1px}
.alignment-guides .guide-line.horizontal{left:0;right:0;height:1px}


/* Tablet browser viewport lock.
   Firefox on Android may expose a desktop-like CSS width, so tablet layout
   cannot depend only on max-width media queries. */
html.pbs-tablet-ui,
html.pbs-tablet-ui body{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

html.pbs-tablet-ui body{
  position:fixed!important;
  inset:0!important;
  width:auto!important;
  height:auto!important;
}

html.pbs-tablet-ui .pbs-app{
  position:fixed!important;
  inset:0!important;
  width:auto!important;
  height:auto!important;
  max-width:none!important;
  max-height:none!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
}

html.pbs-tablet-ui .topbar,
html.pbs-tablet-ui .workspace,
html.pbs-tablet-ui .statusbar{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}

html.pbs-tablet-ui .workspace{
  min-height:0!important;
  overflow:hidden!important;
}

html.pbs-tablet-ui .panel-column,
html.pbs-tablet-ui .designer,
html.pbs-tablet-ui .canvas-viewport,
html.pbs-tablet-ui .canvas-stage{
  min-width:0!important;
  min-height:0!important;
}

html.pbs-tablet-ui .canvas-viewport{
  width:100%!important;
  height:100%!important;
}

html.pbs-tablet-ui .canvas-stage{
  padding:12px!important;
}
