/* Padrão visual dos controles compartilhados. */
/* Advanced-only tools are intentionally unavailable outside the two original
   experiments. Retain their saved preferences/data without exposing the panel. */
#collection :is(#c-advanced-toggle,#c-advanced),
#sintonia :is(#s-advanced-toggle,#s-advanced),
#repasse :is(#r-advanced-toggle,#r-advanced),
#orbita :is(#o-advanced-toggle,#o-advanced) {
  display: none!important;
}
#collection .collection-workspace:not(.rules-open),
#sintonia .s-workspace:not(.rules-open),
#repasse .r-workspace:not(.rules-open),
#orbita .o-workspace:not(.rules-open) {
  grid-template-columns: minmax(0,1fr);
}
/* Latest request: only Reflexos retains advanced options. Corte certo still
   supports its direct on-board handles; only the auxiliary editor is hidden. */
body:has(.games [data-game="cut"][aria-pressed="true"]) :is(#toggle-controls,#advanced-controls) {
  display: none!important;
}
body:has(.games [data-game="cut"][aria-pressed="true"]) .workspace:not(.rules-open) {
  grid-template-columns: minmax(0,1fr);
}
/* Dicas is available only in PACTO; intrinsic puzzle clues and rules stay intact. */
#hint,#s-hint,#r-hint,#o-hint,
#s-hint-apply,#r-hint-apply,#o-hint-apply,
body:not(:has(.games>[data-collection="pacto"][aria-pressed="true"])) #c-hint,
body:not(:has(.games>[data-collection="pacto"][aria-pressed="true"])) #c-hint-apply {
  display: none!important;
}
/* One legible campaign position across every level-based game. */
#main :is(#stage-label,#c-stage-label,#s-stage-label,#r-stage-label,#o-stage-label) {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: .035em;
  color: #405e49;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media(max-width:760px) {
  #main :is(#stage-label,#c-stage-label,#s-stage-label,#r-stage-label,#o-stage-label) {
    font-size: 14px;
    letter-spacing: .025em;
  }
}
/* Remove technical eyebrow labels above game names, not campaign positions. */
#main .lab-heading .eyebrow,
#main .lab-heading .level-stepper:has(> .eyebrow) {
  display: none;
}
/* Empty neutral feedback has no visual footprint; real feedback remains live. */
#main :is(#feedback,#c-status,#s-status,#r-status,#o-status):empty {
  display: none;
}
#main .collection-feedback:not(:has(> :not([hidden]):not(.sr-only):not(:empty))) {
  min-height: 0;
  padding: 0;
}
/* Native disclosure preserves the import fields while opening/closing. */
.level-json-import.json-import-disclosure {
  padding-top: 0;
}
.level-json-import.json-import-disclosure>summary {
  display: list-item;
  list-style: disclosure-closed inside;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  cursor: pointer;
}
.level-json-import.json-import-disclosure[open]>summary {
  list-style-type: disclosure-open;
}
.level-json-import.json-import-disclosure>summary::marker {
  color: #486c4d;
}
@media(max-width:600px) {
  .level-json-import.json-import-disclosure>summary {
    font-size: 14px;
    padding: 14px 0;
  }
}
/* PRUMO's equilibrium aid belongs next to Checar, with a clear pressed state. */
#c-moments {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#c-moments .moments-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#c-moments[aria-pressed="true"] {
  background: #405e49;
  color: #fffefa;
  border-color: #405e49;
  box-shadow: inset 0 0 0 1px #fffefa33;
}
/* Real PRUMO centre-of-mass diagram, outside the interactive board. */
#c-details .prumo-balance {
  display: grid;
  grid-template-columns: minmax(130px,220px) minmax(0,1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  margin: 10px 0 16px;
  border: 1px solid #c3d1b7;
  border-radius: 14px;
  background: #f4f7ec;
  color: #304c38;
}
.prumo-balance svg {
  display: block;
  width: 100%;
  height: auto;
}
.prumo-balance .pb-board {
  fill: #fffefa;
  stroke: #cad3c0;
  stroke-width: 1;
}
.prumo-balance .pb-cell {
  fill: #d6e6bd;
  stroke: #9caf87;
  stroke-width: .7;
}
.prumo-balance .pb-projection {
  fill: none;
  stroke: #9b6b38;
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.prumo-balance .pb-offset {
  fill: none;
  stroke: #94602c;
  stroke-width: 2;
}
.prumo-balance .pb-support {
  fill: #304c38;
  stroke: #fffefa;
  stroke-width: 1;
}
.prumo-balance .pb-center {
  fill: #fffefa88;
  stroke: #9c5822;
  stroke-width: 2.5;
}
.prumo-balance.is-balanced .pb-center {
  stroke: #3d6944;
  fill: none;
  stroke-width: 2.5;
}
.prumo-balance .pb-key {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
}
.prumo-balance .pb-reading strong {
  font-size: 13px;
}
#c-details .prumo-balance p {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.5;
}
.prumo-balance .pb-axis {
  font-weight: 650;
}
#c-details .prumo-balance .pb-note {
  font-size: 11px;
  color: #52614d;
}
@media(max-width:600px) {
  #c-details .prumo-balance {
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
    padding: 12px;
  }
  .prumo-balance .pb-diagram {
    width: min(100%,220px);
    justify-self: center;
  }
}
