/* Keep images, diagrams and action icons in their own layout boxes. */
.oqstats{min-width:0}.oqstats .kpis{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}
.oqstats .kpi{min-width:0;padding:14px}.oqstats .kpi b{font-size:clamp(26px,4vw,40px);line-height:1.15}
.oqstats .grid2>*{min-width:0}.oqstats .leader{width:100%;min-width:0;grid-template-columns:40px minmax(0,1fr) auto;text-align:start}.oqstats .leader>b{overflow-wrap:anywhere}.oqstats .leader>.xxl{font-size:24px!important;white-space:nowrap}
.oqstats .donutbox{gap:14px}.oqstats svg.donut{width:120px!important;height:120px!important;max-width:100%;flex:none}.oqstats svg.linechart{width:100%!important;height:auto!important;aspect-ratio:600/170}.oqstats .chart{max-width:100%;padding:16px 0 6px}.oqstats .legend{flex-wrap:wrap;gap:8px}.oqstats .tablebox{max-width:100%;overflow:auto}.oqstats .row.between{flex-wrap:wrap;gap:12px}
.oqcommunity{width:min(860px,calc(100vw - 24px));max-height:90dvh;overflow:auto;box-sizing:border-box;background:var(--glass,var(--bg2,#151515));color:var(--ink);border:1px solid var(--stroke);border-radius:24px;padding:24px}.oqcommunity::backdrop{background:#0009}.oqcommunity-head{display:flex;align-items:start;justify-content:space-between;gap:16px}.oqcommunity h2{font-size:clamp(22px,4vw,32px);line-height:1.2;margin:8px 0}.oqcommunity p{line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap}.oqcommunity-feed{display:grid;gap:18px;margin:18px 0}.oqcommunity-actions{display:flex;flex-wrap:wrap;gap:8px}.oqcommunity .btn{min-height:44px;white-space:normal;display:inline-flex;align-items:center;justify-content:center;gap:6px}.oqcommunity textarea{width:100%;box-sizing:border-box;font-size:16px;margin:8px 0}.oqcommunity-comment{padding:12px;border-inline-start:3px solid var(--accent);background:var(--glass2);border-radius:10px}.oqcommunity-photo{padding:0;border:0;background:none;width:100%;cursor:zoom-in}.oqcommunity-photo img{width:100%;max-height:400px;object-fit:cover;border-radius:16px}.oqcommunity-entry{margin-bottom:14px}
@media(max-width:700px){
 .oqstats .kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.oqstats .kpi{padding:10px}.oqstats .kpi .label{font-size:10px;white-space:normal;letter-spacing:.03em}.oqstats .kpi b{font-size:28px}.oqstats .grid2{grid-template-columns:minmax(0,1fr)}.oqstats .seg3{flex-wrap:wrap}.oqstats .donutbox{justify-content:center}.oqstats .leader{grid-template-columns:32px minmax(0,1fr) auto;gap:8px}.oqstats .leader .avatar{width:32px;height:32px}.oqstats .leader .label{font-size:10px;white-space:normal}.oqcommunity{padding:16px}.oqcommunity-head{flex-wrap:wrap}.oqcommunity-head>.btn{margin-inline-start:auto}
 html nav.tabs button{min-width:0;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 3px!important}
 html nav.tabs button svg.oq-ic{position:static!important;flex:none;width:22px!important;height:22px!important;margin:0!important;transform:none!important}
 html nav.tabs button span{position:static!important;line-height:1.1!important;font-size:10.5px!important;white-space:nowrap!important}
 html .tbgrid:not(.focus):not(:fullscreen) .tbselwrap{position:static!important;inset:auto!important;transform:none!important;width:100%!important;z-index:auto!important}
}

@media(max-width:700px){html .oq-lang{position:absolute!important;top:8px;z-index:1001}}

.oqaccess{width:min(720px,calc(100vw - 24px));}.oqaccess input,.oqaccess select{max-width:100%;min-width:0}.oqaccess fieldset{border:1px solid var(--line,#444);border-radius:16px;padding:12px}.oqaccess-check{display:flex;gap:10px;align-items:center;min-height:44px}.oqaccess-check input{width:20px;height:20px;flex:none}.oqaccess-right{display:grid;grid-template-columns:1fr minmax(150px,1fr);align-items:center;gap:12px;margin:8px 0}.oqaccess-users{display:grid;gap:10px}.oqaccess-code{font:700 16px/1.5 monospace;overflow-wrap:anywhere;padding:12px;border:1px solid #d4ff3a;border-radius:12px;user-select:all}button[data-v][hidden]{display:none!important}@media(max-width:480px){.oqaccess-right{grid-template-columns:1fr;gap:4px}.oqaccess h2{font-size:22px}.oqaccess .panel{padding:12px}}

/* Each training tool owns its icon box and its label row. */
html .tbtools button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:68px!important;height:auto!important;min-width:0;padding:10px 6px!important;overflow:hidden;isolation:isolate}
html .tbtools .ti{position:static!important;display:grid!important;place-items:center;flex:none;width:30px;height:30px;line-height:1;transform:none!important;margin:0!important}
html .tbtools .ti svg{position:static!important;display:block!important;width:28px!important;height:28px!important;transform:none!important;margin:0!important}
html .tbtools .tl{position:static!important;display:block!important;width:100%!important;max-width:100%;font-size:12px!important;line-height:1.25!important;white-space:normal!important;text-align:center;transform:none!important;margin:0!important;overflow-wrap:anywhere}
html .tbpanes{gap:5px!important;align-items:stretch}
html .tbpanes button{display:flex!important;flex-direction:column!important;align-items:center;justify-content:center;gap:6px!important;min-width:0;min-height:62px!important;height:auto!important;padding:8px 3px!important}
html .tbpanes button svg{position:static!important;flex:none;width:24px!important;height:24px!important;margin:0!important;transform:none!important}
html .tbpanes button span{position:static!important;line-height:1.2!important;font-size:11px!important;white-space:normal!important;overflow-wrap:anywhere;margin:0!important;transform:none!important}

/* Training controls remain readable when theme and mobile sizing change. */
html .tacview .tbtools,html .tacview .tbpanes{min-width:0;max-width:100%;gap:10px!important}
html .tacview .tbtools button,html .tacview .tbpanes button{position:relative;box-sizing:border-box;overflow:visible;min-height:76px!important;background:var(--bg2);color:var(--ink)}
html .tacview .tbtools button[aria-pressed=true],html .tacview .tbpanes button[aria-selected=true]{background:var(--accent)!important;color:var(--on-accent,#06120c)!important}
html .tacview .tbtools button[aria-pressed=true] *,html .tacview .tbpanes button[aria-selected=true] *{color:inherit!important}
html .tacview .tbtools .ti,html .tacview .tbpanes svg{inset:auto!important;align-self:center}
html .tacview .tbtools .tl,html .tacview .tbpanes button span{height:auto!important;max-height:none!important;overflow:visible!important}
html .tacview .tbtools button .tl,html .tacview .tbpanes button span{color:inherit!important}
html .oqrx-dialog:not(.oqrx-expanded){box-sizing:border-box;background:var(--bg2,#1c1c1e)!important;color:var(--ink,#f5f5f7)!important;overflow-x:hidden}
html .oqrx-dialog label,html .oqrx-dialog legend,html .oqrx-dialog summary,html .oqrx-dialog h2,html .oqrx-dialog h3,html .oqrx-dialog h4{color:var(--ink,#f5f5f7)}
html .oqrx-dialog .oqrx-brand p{color:#fff!important}
html .oqrx-dialog input:not([type=color]):not([type=range]):not([type=checkbox]),html .oqrx-dialog select{background:var(--bg2,#1c1c1e)!important;color:var(--ink,#f5f5f7)!important;box-sizing:border-box}
html .oqrx-dialog input::placeholder{color:var(--muted,#b8b8bf);opacity:1}
html .oqrx-dialog .oqrx-symbol-grid button{box-sizing:border-box;min-height:116px;min-width:0;overflow:hidden;background:var(--bg2);color:var(--ink);grid-template-rows:52px auto;align-items:start}
html .oqrx-dialog .oqrx-symbol-grid button>span{position:static!important;width:48px!important;height:48px!important;min-width:48px;min-height:48px;box-sizing:border-box;overflow:hidden;flex:none}
html .oqrx-dialog .oqrx-symbol-grid button>span svg{position:static!important;width:28px!important;height:28px!important;display:block!important;transform:none!important;margin:0!important}
html .oqrx-dialog .oqrx-symbol-grid small{position:static!important;font-size:12px;line-height:1.4;white-space:normal;color:inherit!important;overflow-wrap:anywhere}
html .oqrx-dialog .oqrx-settings>fieldset{min-width:0;max-width:100%;box-sizing:border-box}
html .oqrx-dialog .oqrx-colors{display:flex;flex-wrap:wrap;gap:12px}
html .oqrx-dialog .oqrx-colors>span{box-sizing:border-box;flex:none;min-width:48px;min-height:48px;overflow:hidden}
html .oqrx-dialog #oqrx-settings-status:not(:empty),html .oqrx-dialog #oqrx-sound-status:not(:empty){font-size:14px;font-weight:700;color:var(--ink);line-height:1.5}
html .oqrx-dialog #oqrx-personal-audio{width:20px;height:20px;min-height:20px;accent-color:var(--accent);justify-self:start}
@media(max-width:600px){
 html .tacview .tbpanes{position:static!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
 html .tacview .tbtools{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 html .oqrx-dialog .oqrx-symbol-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 html .oqrx-dialog .oqrx-form{grid-template-columns:minmax(0,1fr)}
 html .oqrx-dialog .oqrx-gallery{padding:10px}
}
@media(max-width:360px){html .tacview .tbtools,html .tacview .tbpanes{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Mobile history actions need the same bounded icon/label layout as tools. */
@media(max-width:600px){
 html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:8px!important;width:100%!important;box-sizing:border-box;overflow:visible!important;padding:8px!important}
 html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl .ib{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:7px!important;min-width:0!important;width:100%!important;min-height:68px!important;height:auto!important;padding:9px 4px!important;white-space:normal!important;box-sizing:border-box;overflow:hidden!important}
 html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl .ib svg{position:static!important;flex:none;width:24px!important;height:24px!important;margin:0!important;transform:none!important}
 html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl .ib::after,html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl .ib span{position:static!important;font-size:11px!important;line-height:1.3!important;letter-spacing:0!important;white-space:normal!important;overflow-wrap:anywhere;max-width:100%;color:inherit}
 html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl .tbhl{display:none!important}
}
@media(max-width:360px){html .tacview .tbgrid:not(.focus):not(:fullscreen) .tbctl{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Preview of personal signals: style tile containers only, never number spans. */
html .oqrx-card .oqrx-colors,html .oqrx-dialog .oqrx-colors{display:flex;flex-wrap:wrap;gap:12px;max-width:100%;min-width:0}
html .oqrx-card .oqrx-colors>span,html .oqrx-dialog .oqrx-colors>span{position:relative;display:grid;place-items:center;box-sizing:border-box;width:56px!important;height:56px!important;min-width:56px;min-height:56px;padding:10px!important;flex:0 0 56px;overflow:hidden;border-radius:14px}
html .oqrx-card .oqrx-colors>span>.oqrx-digit,html .oqrx-dialog .oqrx-colors>span>.oqrx-digit{position:static!important;display:block!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;font-size:24px!important;line-height:1!important;color:inherit!important;transform:none!important}
html .oqrx-card .oqrx-colors>span>svg,html .oqrx-dialog .oqrx-colors>span>svg{position:static!important;display:block;width:100%!important;height:100%!important;min-width:0;min-height:0;margin:0!important;transform:none!important}
