/* Owner edit mode for results.html — inert unless <body> has .ff-editing */

.ff-edit-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 9999; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 999px;
  background: #18150F; color: #fff;
  box-shadow: 0 10px 34px rgba(0,0,0,.32);
  font: 500 13px/1.2 system-ui, -apple-system, sans-serif;
}
.ff-edit-bar .ff-dot { width: 8px; height: 8px; border-radius: 50%; background: #C8A24A; }
.ff-edit-bar button {
  font: inherit; cursor: pointer; border: 0; border-radius: 999px;
  padding: 8px 14px; background: #C8A24A; color: #18150F; font-weight: 700;
}
.ff-edit-bar button.ghost { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.ff-edit-bar button:focus-visible,
.ff-edit-lock button:focus-visible,
.ff-edit-lock input:focus-visible {
  outline: 3px solid #C8A24A; outline-offset: 2px;
}
.ff-edit-bar .ff-status { opacity: .75; min-width: 76px; }

.ff-editing [data-ed] {
  outline: 1px dashed rgba(200,162,74,.75);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: text;
  transition: background .12s ease;
}
.ff-editing [data-ed]:hover { background: rgba(200,162,74,.10); }
.ff-editing [data-ed]:focus,
.ff-editing [data-ed]:focus-visible {
  outline: 2px solid #C8A24A; outline-offset: 3px;
  background: rgba(200,162,74,.14);
}

/* Passcode gate */
.ff-edit-lock {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(24,21,15,.62); backdrop-filter: blur(6px);
}
.ff-edit-lock form {
  background: #fff; border-radius: 16px; padding: 26px;
  width: min(360px, calc(100vw - 32px));
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
  font: 400 15px/1.4 system-ui, -apple-system, sans-serif; color: #18150F;
}
.ff-edit-lock h2 { margin: 0 0 6px; font-size: 19px; }
.ff-edit-lock p { margin: 0 0 16px; font-size: 13px; color: #6b6558; }
.ff-edit-lock input {
  width: 100%; box-sizing: border-box; padding: 11px 12px; font: inherit;
  border: 1px solid #d9d3c6; border-radius: 10px; margin-bottom: 12px;
}
.ff-edit-lock .row { display: flex; gap: 8px; justify-content: flex-end; }
.ff-edit-lock button {
  font: inherit; cursor: pointer; border: 0; border-radius: 10px;
  padding: 10px 16px; background: #18150F; color: #fff; font-weight: 700;
}
.ff-edit-lock button.ghost { background: #efece4; color: #18150F; }
.ff-edit-lock .err { color: #b4321f; font-size: 13px; margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .ff-editing [data-ed] { transition: none; }
}
