.sub-head,
.fs-heading,
.tw-heading,
.px-heading,
.px-topbar,
.rc-fairness-host {
  position: relative;
  padding-right: 52px;
}
.sub-head.rc-fairness-host,
.fs-heading.rc-fairness-host {
  padding-right: 132px;
}
.fs-heading.rc-fairness-host,
.tw-heading.rc-fairness-host,
.px-heading.rc-fairness-host {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
/* Leave room for shield + verify/download so they never hide under the floor badge. */
.tw-heading.rc-fairness-host {
  padding-right: 132px;
  align-items: center;
}
.tw-heading.rc-fairness-host .tw-floor-count {
  margin-right: 0;
}
.rc-fairness-anchor {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 8;
  pointer-events: auto;
}
/* Sit left of the info button on the pickaxe topbar. */
#view-pickaxe .px-topbar.rc-fairness-host {
  padding-right: 0;
}
#view-pickaxe .rc-fairness-anchor--pickaxe {
  right: 48px;
  top: 0;
  pointer-events: auto;
}
#view-pickaxe .rc-fairness-anchor--pickaxe .rc-fairness-shield,
#view-pickaxe .rc-fairness-anchor--pickaxe .rc-fairness-verify,
#view-pickaxe .rc-fairness-anchor--pickaxe .rc-fairness-download {
  pointer-events: auto;
}
/* Sit left of the fruit sound button. */
#view-fruit .fs-heading.rc-fairness-host {
  padding-right: 48px;
}
#view-fruit .rc-fairness-anchor--fruit {
  right: 52px;
}
.rc-fairness-shield {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #ad895b66;
  border-radius: 10px;
  background: linear-gradient(165deg, #3a2f24 0%, #241c15 100%);
  color: #d6b275;
  box-shadow: 0 4px 14px #00000055, inset 0 1px 0 #ffffff12;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .15s ease, transform .12s ease, background .15s ease;
}
.rc-fairness-shield svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rc-fairness-shield:hover,
.rc-fairness-shield:focus-visible {
  border-color: #d6b275aa;
  background: linear-gradient(165deg, #46382b 0%, #2b2118 100%);
  outline: none;
}
.rc-fairness-shield:active { transform: scale(.96); }
.rc-fairness-verify,
.rc-fairness-download {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ad895b55;
  background: #1f1812ee;
  color: #e8d4b0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 6px 18px #00000044;
}
.rc-fairness-verify.is-visible,
.rc-fairness-download.is-visible { display: inline-flex; }
.rc-fairness-verify:hover,
.rc-fairness-download:hover { border-color: #d6b27599; color: #fff3dc; }
.rc-fairness-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: end center;
  padding: max(12px, env(safe-area-inset-bottom)) 12px 20px;
  background: #0a0806bb;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.rc-fairness-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}
.rc-fairness-panel {
  width: min(440px, 100%);
  max-height: min(78vh, 640px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #ad895b55;
  background: linear-gradient(180deg, #2e251c 0%, #1a1410 100%);
  color: #efe2cc;
  box-shadow: 0 24px 60px #00000088;
  padding: 18px 16px 16px;
}
.rc-fairness-panel h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #fff5e4;
}
.rc-fairness-panel p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #c9b69a;
}
.rc-fairness-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a8916f;
}
.rc-fairness-value {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #5a483566;
  background: #120e0acc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
  color: #f3e6d2;
  user-select: text;
  -webkit-user-select: text;
}
.rc-fairness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.rc-fairness-actions button,
.rc-fairness-actions a {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ad895b66;
  background: linear-gradient(180deg, #4a3b2d 0%, #32281f 100%);
  color: #fff0d8;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.rc-fairness-actions a.secondary,
.rc-fairness-actions button.secondary {
  background: #1c1611;
  color: #d8c4a4;
}
.rc-fairness-actions button:disabled { opacity: .55; cursor: default; }
.rc-fairness-status {
  margin-top: 10px;
  font-size: 12px;
  min-height: 1.2em;
  color: #9fd49a;
}
.rc-fairness-status.is-error { color: #e8a0a0; }
.rc-fairness-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #ffffff10;
  color: #e8d4b0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.rc-fairness-panel-wrap { position: relative; }
