.bafc-host {
  position: relative;
}

.bafc-host .bafc-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  user-select: none;
}

.bafc-host .bafc-note {
  position: absolute;
  display: block;
  box-sizing: border-box;
  padding: 0 .2em;
  margin: 0;
  background: transparent;
  color: #fff;
  font: 750 clamp(15px, 1.6vw, 23px)/1.35 system-ui, sans-serif;
  letter-spacing: .025em;
  text-align: start;
  text-shadow: -1px -1px 1px #151515, 1px -1px 1px #151515,
    -1px 1px 1px #151515, 1px 1px 1px #151515, 0 2px 4px #111;
}

.bafc-host .bafc-moving {
  width: max-content;
  max-width: none;
  white-space: pre;
  animation: bafc-cross linear forwards;
}

@keyframes bafc-cross {
  from { left: 100%; transform: translateX(0); }
  to   { left: 0; transform: translateX(-100%); }
}

.bafc-host .bafc-still {
  top: 8%;
  left: 3%;
  max-width: 94%;
  overflow-wrap: anywhere;
}

.bafc-item {
  min-width: 0;
}
.bafc-item > .bf-gallery-item {
  height: auto;
  width: 100%;
}
.bafc-widget {
  margin: .55rem 0;
  font: 400 .875rem/1.5 system-ui, sans-serif;
  text-align: start;
  overflow-wrap: anywhere;
}
.bafc-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  align-items: center;
}
.bafc-widget [hidden] { display: none !important; }
.bafc-widget .bafc-button {
  min-height: 32px;
  margin: 0;
  padding: .15rem .3rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.bafc-widget :is(button,input):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.bafc-panel {
  margin-top: .3rem;
  padding: .7rem;
  background: #fffdf9;
  color: #302b28;
  border: 1px solid #d9d0c8;
  border-radius: .45rem;
}
.bafc-list {
  max-height: 10rem;
  margin: 0 0 .7rem;
  padding-inline-start: 1.25rem;
  overflow: auto;
}
.bafc-list:empty, .bafc-feedback:empty { display: none; }
.bafc-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem;
}
.bafc-label, .bafc-feedback { grid-column: 1 / -1; }
.bafc-widget .bafc-input, .bafc-widget .bafc-submit {
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: .3rem .55rem;
  border: 1px solid #796f67;
  border-radius: .3rem;
  font: inherit;
}
.bafc-widget .bafc-input { background: #fff; color: #26221e; }
.bafc-widget .bafc-submit { background: #42392f; color: #fff; cursor: pointer; }
.bafc-widget .bafc-submit:disabled { opacity: .65; cursor: wait; }
.bafc-widget .bafc-feedback, .bafc-widget .bafc-empty { margin: 0; }
.bafc-widget .bafc-empty { margin-bottom: .55rem; }
.bafc-widget .bafc-beta { font-weight: 700; }
.bafc-widget .bafc-rules { margin: .2rem 0 .65rem; font-size: .82rem; line-height: 1.45; }
.bafc-gallery-panel {
  box-sizing: border-box;
  width: min(100%, 64rem);
  margin: clamp(1.5rem, 4vw, 3rem) auto;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid #d6cec4;
  border-radius: .5rem;
  background: #fffdfa;
  color: #302a24;
  scroll-margin-top: 5rem;
}
.bafc-gallery-panel h2 { margin: 0 0 .75rem; font-size: clamp(1.15rem, 3vw, 1.5rem); }
.bafc-gallery-panel .bafc-form { margin-top: .8rem; }
.bafc-gallery-panel .bafc-list { overflow-wrap: anywhere; }
