/* Mascot tuner overlay (opt-in via ?mascot-edit=1 or data-mascot-edit).
   Layout, palette, and typography mirror wireframe-mesh.css's tuner so the
   two debug surfaces feel like one tool. */

.hoarde-mascot-gear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  font: 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #f4efe2;
  border: 1px solid rgba(244, 239, 226, 0.4);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 200ms ease;
  z-index: 3;
}

.mascot-canvas:hover .hoarde-mascot-gear,
.hoarde-mascot-gear:focus-visible,
.hoarde-mascot-gear[aria-expanded="true"] {
  opacity: 1;
}

.hoarde-mascot-tuner {
  /* Float in the viewport corner so the panel is never occluded by sibling
     hero content (verification cards, copy column, etc.). */
  position: fixed;
  top: 16px;
  right: 16px;
  width: 300px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: rgba(13, 11, 14, 0.96);
  color: #f4efe2;
  border: 1px solid rgba(244, 239, 226, 0.25);
  border-radius: 4px;
  padding: 10px;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  z-index: 2147483647;  /* max int — sit above absolutely everything */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hoarde-mascot-tuner[hidden] {
  display: none;
}

.hoarde-mascot-tuner fieldset {
  border: 1px solid rgba(244, 239, 226, 0.18);
  border-radius: 3px;
  margin: 0 0 8px 0;
  padding: 6px 8px 8px;
}

.hoarde-mascot-tuner legend {
  padding: 0 4px;
  color: rgba(244, 239, 226, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hmt-row {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.hmt-row--check {
  grid-template-columns: 1fr;
}

.hmt-row label {
  color: rgba(244, 239, 226, 0.8);
}

.hmt-row input[type="range"] {
  width: 100%;
  margin: 0;
}

.hmt-row select,
.hmt-row--text input[type="text"] {
  grid-column: 2 / span 2;
  background: rgba(0, 0, 0, 0.4);
  color: #f4efe2;
  border: 1px solid rgba(244, 239, 226, 0.3);
  font: inherit;
  padding: 2px 4px;
  width: 100%;
  box-sizing: border-box;
}

.hmt-row output {
  text-align: right;
  color: rgba(244, 239, 226, 0.6);
  font-variant-numeric: tabular-nums;
}

.hmt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hmt-actions button {
  flex: 1 1 calc(50% - 3px);
  background: rgba(244, 239, 226, 0.1);
  color: #f4efe2;
  border: 1px solid rgba(244, 239, 226, 0.3);
  border-radius: 2px;
  padding: 4px 6px;
  font: inherit;
  cursor: pointer;
}

.hmt-actions button:hover {
  background: rgba(244, 239, 226, 0.18);
}

.hmt-output {
  margin: 8px 0 0;
  padding: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(244, 239, 226, 0.2);
  border-radius: 2px;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  color: rgba(244, 239, 226, 0.85);
  font-size: 10px;
  user-select: text;
}

/* ─── Studio compare rail (used only on /hoarde-mascot-studio/) ───────── */

.studio-grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  justify-items: center;
  width: 100%;
  max-width: calc(360px * 3 + 1.5rem * 2);
  margin: 0 auto;
}

.studio-stage--compare {
  width: min(100%, 360px);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: grid;
  gap: 0.5rem;
  place-items: center;
  border: 1px solid rgba(244, 239, 226, 0.18);
  position: relative;
}

.studio-stage__label {
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 239, 226, 0.75);
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 28px;  /* keep label clear of remove button */
  box-sizing: border-box;
}

.studio-stage__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.studio-stage__media > video,
.studio-stage__media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.studio-stage__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(13, 11, 14, 0.7);
  color: #f4efe2;
  border: 1px solid rgba(244, 239, 226, 0.3);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font: 14px/1 ui-monospace, monospace;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}

.studio-stage__remove:hover {
  background: rgba(13, 11, 14, 0.9);
  border-color: rgba(244, 239, 226, 0.6);
}

.studio-drop-hint {
  text-align: center;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(244, 239, 226, 0.5);
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 8px;
}

.studio-drop-hint:hover {
  color: rgba(244, 239, 226, 0.85);
}

body.is-dragover {
  outline: 2px dashed rgba(244, 239, 226, 0.45);
  outline-offset: -10px;
}

.studio-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.studio-actions button {
  background: rgba(244, 239, 226, 0.08);
  color: #f4efe2;
  border: 1px solid rgba(244, 239, 226, 0.25);
  border-radius: 2px;
  padding: 6px 12px;
  font: 11px/1 ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.studio-actions button:hover {
  background: rgba(244, 239, 226, 0.15);
}

.studio-actions[hidden] {
  display: none;
}
